Download presentation
Presentation is loading. Please wait.
Published byCaren Young Modified over 9 years ago
1
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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
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
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: 2×4: Engineering Computation: An Introduction Using MATLAB and Excel
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
6
Matrix Operations Matrix Addition Multiplication of a Matrix by a Scalar Matrix Multiplication Matrix Transposition Finding the Determinate of a Matrix Matrix Inversion Engineering Computation: An Introduction Using MATLAB and Excel
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
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
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
10
Multiplication of Matrices Consider these matrices: Can we find this product? What will be the size of C? Engineering Computation: An Introduction Using MATLAB and Excel Yes, 3 columns of A = 3 rows of B 2 X 2: 2 rows in A, 2 columns in B
11
Multiplication of Matrices Easy way to remember rules for multiplication: Engineering Computation: An Introduction Using MATLAB and Excel These values must match Size of Product Matrix
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
13
Example – Matrix Multiplication Find We know that matrix C will be 2 × 2 Element c 11 is found by multiplying terms of row 1 of A and column 1 of B: Engineering Computation: An Introduction Using MATLAB and Excel
14
Example – Matrix Multiplication Element c 12 is found by multiplying terms of row 1 of A and column 2 of B: Engineering Computation: An Introduction Using MATLAB and Excel
15
Example – Matrix Multiplication Element c 21 is found by multiplying terms of row 2 of A and column 1 of B: Engineering Computation: An Introduction Using MATLAB and Excel
16
Example – Matrix Multiplication Element c 22 is found by multiplying terms of row 2 of A and column 2 of B: Engineering Computation: An Introduction Using MATLAB and Excel
17
Example – Matrix Multiplication Solution: Engineering Computation: An Introduction Using MATLAB and Excel
18
Practice Problems Find C = AB Engineering Computation: An Introduction Using MATLAB and Excel
19
Practice Problems Find C = AB Engineering Computation: An Introduction Using MATLAB and Excel
20
Practice Problems Find C = AB Engineering Computation: An Introduction Using MATLAB and Excel
21
Matrix Multiplication In general, matrix multiplication is not commutative: AB ≠ BA Engineering Computation: An Introduction Using MATLAB and Excel
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
23
Determinate of a Matrix The determinate of a square matrix is a scalar quantity that has some uses in matrix algebra. Finding the determinate of 2 × 2 and 3 × 3 matrices can be done relatively easily: The determinate is designated as |A| or det(A) 2 × 2: Engineering Computation: An Introduction Using MATLAB and Excel
24
Determinate of a Matrix Examples: Engineering Computation: An Introduction Using MATLAB and Excel
25
Determinate 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
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
27
Inverse of a Matrix The inverse of a 2X2 matrix is easy to find: Engineering Computation: An Introduction Using MATLAB and Excel
28
Inverse of a Matrix Example: find inverse of A: Engineering Computation: An Introduction Using MATLAB and Excel
29
Check Result Engineering Computation: An Introduction Using MATLAB and Excel
30
Practice Problem Find A -1, check that A A -1 = I Engineering Computation: An Introduction Using MATLAB and Excel
31
Inverse of a Matrix Note from the formula for the inverse of a 2 × 2 matrix that if the determinate equals zero, then the inverse is undefined This is true generally: the inverse of a square matrix exists only of the determinate is non-zero Engineering Computation: An Introduction Using MATLAB and Excel
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.