Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 7 Matrix Mathematics

Similar presentations


Presentation on theme: "Chapter 7 Matrix Mathematics"— Presentation transcript:

1 Chapter 7 Matrix Mathematics
Matrix Operations Chapter 7 Matrix Mathematics Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1

2 Matrix Mathematics Matrices are very useful in engineering calculations. For example, matrices are used to: Efficiently store a large number of values (as we have done with arrays in MATLAB) Solve systems of linear simultaneous equations Transform quantities from one coordinate system to another Several mathematical operations involving matrices are important Engineering Computation: An Introduction Using MATLAB and Excel 2

3 Review: Properties of Matrices
A matrix is a one-or two dimensional array A quantity is usually designated as a matrix by bold face type: A The elements of a matrix are shown in square brackets: Engineering Computation: An Introduction Using MATLAB and Excel 3

4 Review: Properties of Matrices
The dimension (size) of a matrix is defined by the number of rows and number of columns Examples: 3 × 3: ×4: Engineering Computation: An Introduction Using MATLAB and Excel 4

5 Review: Properties of Matrices
An element of a matrix is usually written in lower case, with its row number and column number as subscripts: In MATLAB, an element is designated by the matrix name with the row and column numbers in parentheses: A(1,2) Engineering Computation: An Introduction Using MATLAB and Excel 5

6 Matrix Operations Matrix Addition
Multiplication of a Matrix by a Scalar Matrix Multiplication Matrix Transposition Finding the Determinant of a Matrix Matrix Inversion Engineering Computation: An Introduction Using MATLAB and Excel 6

7 Matrix Addition Vectors must be the same size in order to add
To add two vectors, add the individual elements: Matrix addition is commutative: A + B = B + A Engineering Computation: An Introduction Using MATLAB and Excel 7

8 Multiplication of a Matrix by a Scalar
To multiple a matrix by a scalar, multiply each element by the scalar: We often use this fact to simplify the display of matrices with very large (or very small) values: Engineering Computation: An Introduction Using MATLAB and Excel 8

9 Multiplication of Matrices
To multiple two matrices together, the matrices must have compatible sizes: This multiplication is possible only if the number of columns in A is the same as the number of rows in B The resultant matrix C will have the same number of rows as A and the same number of columns as B Engineering Computation: An Introduction Using MATLAB and Excel 9

10 Multiplication of Matrices
Consider these matrices: Can we find this product? What will be the size of C? Yes, 3 columns of A = 3 rows of B 2 X 2: 2 rows in A, 2 columns in B Engineering Computation: An Introduction Using MATLAB and Excel 10

11 Multiplication of Matrices
Easy way to remember rules for multiplication: These values must match Size of Product Matrix Engineering Computation: An Introduction Using MATLAB and Excel 11

12 Multiplication of Matrices
Element ij of the product matrix is computed by multiplying each element of row i of the first matrix by the corresponding element of column j of the second matrix, and summing the results This is best illustrated by example Engineering Computation: An Introduction Using MATLAB and Excel 12

13 Example – Matrix Multiplication
Find We know that matrix C will be 2 × 2 Element c11 is found by multiplying terms of row 1 of A and column 1 of B: Engineering Computation: An Introduction Using MATLAB and Excel 13

14 Example – Matrix Multiplication
Element c12 is found by multiplying terms of row 1 of A and column 2 of B: Engineering Computation: An Introduction Using MATLAB and Excel 14

15 Example – Matrix Multiplication
Element c21 is found by multiplying terms of row 2 of A and column 1 of B: Engineering Computation: An Introduction Using MATLAB and Excel 15

16 Example – Matrix Multiplication
Element c22 is found by multiplying terms of row 2 of A and column 2 of B: Engineering Computation: An Introduction Using MATLAB and Excel 16

17 Example – Matrix Multiplication
Solution: Engineering Computation: An Introduction Using MATLAB and Excel 17

18 Practice Problems Find C = AB
Engineering Computation: An Introduction Using MATLAB and Excel 18

19 Practice Problems Find C = AB
Engineering Computation: An Introduction Using MATLAB and Excel 19

20 Practice Problems Find C = AB
Engineering Computation: An Introduction Using MATLAB and Excel 20

21 Matrix Multiplication
In general, matrix multiplication is not commutative: AB ≠ BA Engineering Computation: An Introduction Using MATLAB and Excel 21

22 Transpose of a Matrix The transpose of a matrix by switching its row and columns The transpose of a matrix is designated by a superscript T: The transpose can also be designated with a prime symbol (A’). This is the nomenclature used in MATLAB Engineering Computation: An Introduction Using MATLAB and Excel 22

23 Determinant of a Matrix
The determinant of a square matrix is a scalar quantity that has some uses in matrix algebra. Finding the determinant of 2 × 2 and 3 × 3 matrices can be done relatively easily: The determinant is designated as |A| or det(A) 2 × 2: Engineering Computation: An Introduction Using MATLAB and Excel 23

24 Determinant of a Matrix
Examples: Engineering Computation: An Introduction Using MATLAB and Excel 24

25 Determinant of a Matrix
3 × 3: Similar for larger matrices, but easier to do with MATLAB or Excel Engineering Computation: An Introduction Using MATLAB and Excel 25

26 Inverse of a Matrix Some square matrices have an inverse
If the inverse of a matrix exists (designated by -1 superscript), then where I is the identity matrix – a square matrix with 1’s as the diagonal elements and 0’s as the other elements Engineering Computation: An Introduction Using MATLAB and Excel 26

27 Inverse of a Matrix The inverse of a 2X2 matrix is easy to find:
Engineering Computation: An Introduction Using MATLAB and Excel 27

28 Inverse of a Matrix Example: find inverse of A:
Engineering Computation: An Introduction Using MATLAB and Excel 28

29 Check Result Engineering Computation: An Introduction Using MATLAB and Excel 29

30 Practice Problem Find A-1, check that A A-1 = I
Engineering Computation: An Introduction Using MATLAB and Excel 30

31 Inverse of a Matrix Note from the formula for the inverse of a 2 × 2 matrix that if the determinant equals zero, then the inverse is undefined This is true generally: the inverse of a square matrix exists only of the determinant is non-zero Engineering Computation: An Introduction Using MATLAB and Excel 31


Download ppt "Chapter 7 Matrix Mathematics"

Similar presentations


Ads by Google