This preview shows page 1. Sign up to view the full content.
Unformatted text preview: MATRIX DEFINITION
A matrix is defined as a rectangular array matrix of quantities arranged in rows and columns. of
a a .. a a 12 13 1n 11 a 21 a 22 a 23 .. a 2n a a a .. a [ A] = 31 32 33 3n .. .. .. .. .. a a .. a a m2 m3 mn m1 Aij is the quantity A of the ith row and jth column
CE 221 CE MATRIX TYPES
Column Matrix – All elements are in a single column
2 − 5 3 Row Matrix – All elements are in a single row [3 7 − 2] Square Matrix – Any matrix with equal number of columns and rows
2 1 4 7 1 0 CE 221 CE 0 2 0 MATRIX TYPES
Symmetric Matrix is a square matrix where the element aij = aji
3 [A ]= 6 −4 6 2 1 4 1 5 Diagonal Matrix is a square matrix where all the elements are zero except those along the main diagonal
3 [B ]= 0 0 0 2 0 0 0 6 Unit or Identity Matrix is a diagonal matrix where the values of all Unit diagonal elements are 1 diagonal 1 0 0 [C ]= 0 1 0 0 0 1 CE 221 CE MATRIX TYPES
Lower Triangular Matrix
7 [A ]= 8 4 2 [B ]= 0 0 0 2 6 0 0 1 3 5 2 Upper Triangular Matrix Upper
1 4 0 Null Matrix is a matrix whose elements are zero
0 [C ]= 0 0 CE 221 CE 0 0 0 0 0 0 MATRIX OPERATIONS
Two matrices ( [A] and [B]) are equal if and Two only if the quantities in all rows and columns are equal equal [A] = 2 7 3 5 − 1 4 CE 221 CE [B] = [B] 2 7 3 5 − 1 4 MATRIX OPERATIONS  Addition MATRIX Addition
Two matrices ( [A] and [B]) can be added or subtracted if the numbers of rows and columns are identical. Add or subtract the Aij quantity to or from the corresponding Bij quantity.
5 2 [ A ] = 7 − 1 − 3 4 4 1 [ B] = 6 − 1 3 2 6 [ A] + [ B] = 13 0 6 − 2 6 CE 221 CE MATRIX OPERATIONS
TRANSPOSE OF A MATRIX
The transpose of the matrix [A] denoted [A]T can be had by changing the columns in [A[ to rows in [A]T as shown below. 2 5 3 [A] = 7 − 1 4 [A] − 3 4 5 2 7 − 3 [A] T = 5 −1 4 3 4 5 And 47 34 [B] = [B] 27 12 28 8 CE 221 CE 47 [B]T = [B] 12 34 28 27 8 MATRIX OPERATIONS
TRANSPOSED MATRICES
Transposed matrices hold the following properties: {[A] + [B]}T = [A]T + [B]T {6*[A]}T = 6*[A]T {[A]*[B]}T = [B]T * [A]T CE 221 CE MATRIX OPERATIONS
Multiplication
A matrix can be multiplied by a scalar by multiplying each matrix element in the matrix by the scalar. element 6 3 [A] = 1 36 18 6 * [A] = 6 4 −3 0 0 7 3 24 0 −18 42 0 18 CE 221 CE MATRIX OPERATIONS
Multiplication The results of multiplying [A] by [B] is not the same as The multiplying [B] by [A]; the product of two matrices is not commutative commutative [A]*[B] = [B]*[A] In matrix multiplication, the distributive and associative In laws are valid. laws [A]*{[B] + [C]} = [A]*[B] + [A]*[C] [A]*{[B]*[C]} = {[A]*[B]}*[C]
CE 221 CE MATRIX OPERATIONS
Multiplication Two matrices [A] and [B] can be multiplied if and only if the Two Any element Cij in [ C] is equal to∑ Aik Bkj
k =1
CE 221 CE number of columns in [A] is equal to the number of rows in [B], the two matrices are conformable the The resulting matrix [C] has the same number of row as [A] and The the same number of columns as [B]. That is the [A] * [B] = [C] [A] (i by m) * (m by j) = (i by j) (i m MATRIX OPERATIONS
Multiplication If [C] is the result of multiplying [A] by [B], then If [C] would have the same number of row as [A] and the same number of columns as [B]. That is and [A] * [B] = [C] (i by m) * (m by j) = (i by j) (i Any element Cij in [C] is equal to ∑ ( A )( B )
m k =1 ik kj CE 221 CE MATRIX OPERATIONS
Example of multiplying two 3 by 3 matrices
3 [A]= 2 1 2 4 3 1 5 ; 1 − 1 [B ]= 0 4 3 1 0 2 1 6 ( 3 )( 3 ) + ( 2 )( 1) + (1)( 0 ) ( 2 )( 3 ) + ( 4 )( 1) + ( 5 )( 0 ) (1)( 3 ) + ( 3 )( 1) + ( −1)( 0 ) ( 3 )( 2 ) + ( 2 )( 1) + (1)( 6 ) ( 2 )( 2 ) + ( 4 )( 1) + ( 5 )( 6 ) (1)( 2 ) + ( 3 )( 1) + ( −1)( 6 ) [A]* [B ]=
7 [C ]= 22 −3 ( 3 )( 1) + ( 2 )( 0 ) + (1)( 4 ) [C ]= ( 2 )( 1) + ( 4 )( 0 ) + ( 5 )( 4 ) (1)( 1) + ( 3 )( 0 ) + ( −1)( 4 ) 11 14 10 38 − 1 6 CE 221 CE MATRIX OPERATIONS
Multiplication
Example of multiplying (3 by 3) by (3 by 2) matrices to yields (3 by 2) Example matrix [C] 5 3 1 2 4 Multiply [ A ] = 7 − 1 4 by [ B ] = 6 − 1; [ A ] × [ B ] = [ C] − 3 4 5 3 5 (2)(1) + (5)(−1) + (3)(5) (2)(4) + (5)(6) + (3)(3) [ C] = (7)(4) + (−1)(6) + (4)(3) (7)(1) + (−1)(−1) + (4)(5) (−3)(4) + (4)(6) + (5)(3) (−3)(1) + (4)(−1) + (5)(5) 47 12 [ C] = 34 28 27 8 CE 221 CE MATRIX OPERATIONS
PARTITIONING
A matrix can be partitioned into submatrices as follows: a11 [ A ] = a21 a31 a12 a22 a32 a13 a23 a33 [ A11 ] = [ a11 ] ;
a21 [ A 21 ] = ; a31 [ A12 ] = [ a12 a14 = A11 a24 A 21 a34 a13 A12 A 22 a14 ] a24 a34 a22 [ A 22 ] = a32
CE 221 CE a23 a33 MATRIX OPERATIONS
PARTITIONING Matrix algebra applies to partitioned matrices if they are conformable.
6 [A]= 2 1 5 4 − 2 3 0 3 − 3 2 [B]= 5 6 7 1 [A12 ] B11 [A11] [B11] + [A12 ] [B21] × × × = [ ] [ ] + [ ] [ ] [A22 ] B21 A21 × B11 A22 × B21 [A ] [A] [B]= 11 × [A21] CE 221 CE MATRIX OPERATIONS
PARTITIONING (continued) PARTITIONING (continued)
−3 6 37 5 2 × = − − 2 5 6 2 6 [A12 ]× [B 21 ] = 4 × [7 1 ] = 28 21 3 3 21 −3 [A 21 ]× [B 11 ] = [1 0 ]× 2 −3] = [2 6 5 [A 22 ]× [B 21 ] = [3 ]× [7 1 ] = [21 3 ] [A11 ]× [B 11 ] = 12 − 18 37 [A ]× [B ] = − 6 2 12 − 18 −3 28 + 21 21 CE 221 CE 65 4 3 = 15 23 3 16 − 15 0 MATRIX OPERATIONS
DETERMINANTS
A determinant is a square array of numbers enclosed within determinant Vertical bars as in the nth order determinant below. Vertical A= a11 a21 .. an1 a12 a22 .. an 2
CE 221 CE .. a1n .. a2n .. .. .. ann MATRIX OPERATIONS
DETERMINANTS Evaluation of a determinant leads to a single value, which can be obtained using Laplace’s expansion. Laplace’s The procedure uses the determinant minors and cofactors).
CE 221 CE MATRIX OPERATIONS
Determinant of a square matrix (2 by 2) a11 [A]= a 21 a12 a11 ; A= a 22 a 21 a12 a 22 ; A = a11a22 − a12 a 21 For example 2 [A]= 1 − 3 ; 4 A = [( 2 )( 4 ) − ( − 3 )(1) ]= 11 CE 221 CE MATRIX OPERATIONS
Determinant of a square matrix (3 by 3) S11 S12 S13 Let [S]= Sij = S21 S22 S23 S31 S32 S33 then S11 S = S 21 S31 S12 S 22 S32 S13 S 23 S33 A determinant of order n can be evaluated from the cofactors (Coij) of element Sij from minor Mij of any row I or column j as follows: S = ∑ Sij Coij
j =1 n or
CE 221 CE S = ∑ Sij Coij
i =1 n MATRIX OPERATIONS
Determinant of a square matrix (3 by 3)
3 [ A ]= 1 9 Co 11 = Co 12 = Co 13 = 0 −1 2
1+ 1` 2 7 ; 6 −1 2 9 A= ∑ n j= 1 a ij Co ij ( − 1) 7 = ( − 1 ) 2 {(− 1 )( 6 ) − ( 7 )( 2 )}= − 20 6 7 = ( − 1 ) 3 {( )( 6 ) − ( 7 )( 9 )}= − 57 1 6 −1 2 = ( − 1 ) 4 {( )( 2 ) − ( − 1 )( 9 )}= 11 1 ( − 1 )1 + 2 ` 1 ( − 1)
1+ 3 ` 1 9 A = ( 3 )( − 20 ) + ( 0 )( − 57 ) + ( 2 )( 11 ) =  38
CE 221 CE MATRIX OPERATIONS
Determinant of a square matrix (3 by 3), Determinant alternative method alternative
( a11 ) A = ( a12 ) ( a ) 13 ( a22 ) ( a33 ) + ( a31 ) ( a22 ) ( a13 ) + ( a23 ) ( a31 ) + − ( a32 ) ( a23 ) ( a11 ) + ( a21 ) ( a32 ) ( a33 ) ( a21 ) ( a12 ) CE 221 CE MATRIX OPERATIONS
Determinant of a (4X4) matrix
[
A
= 3 3 4 0 1 1 2 0 4 0 1 2 0 3 −1 1 1 2 0 0 1 −1 3 −1 1 −2 3 4 −2 3 4 −2 3 4 2 4 −0 0 1 4 −2 0 1 3 −1 1 1 2 0 −2 3 4 3 −1 1 + A = (− 1) Where the determinants of the 3 by 3 matrices can be evaluated as before.
CE 221 CE MATRIX OPERATIONS
Determinant The determinant of a matrix can also be The found by converting the matrix into an upperfound triangular matrix using elementary row transformation and then multiplying the elements in the diagonal as shown in the elements example. example. CE 221 CE MATRIX OPERATIONS
Determinant
1 2 3 1 1 0 0 0 4 2 0 2 4 −6 0 0 −2 0 −1 2 −2 4 −3 8 3 3 4 2 −3 = 1 0 0 0 3 −2 −3 16 − 3 1 = 0 0 0 4 −6 − 12 −2 4 −6 0 0 −2 4 5 4 −2 4 −3 0 3 −2 −7 −6 = 3 −2 −3 −8 = ( 1 )( − 6 )( − 3 )( − 8 ) = 144
CE 221 CE MATRIX OPERATIONS
Matrix Inversion Inversion of a matrix can be accomplished using the GaussJordan technique. First augment the given matrix with the identity matrix of the same given order, then reduce the original matrix into an identity matrix. The augmented matrix is the inversion of the original matrix. inversion
CE 221 CE MATRIX OPERATIONS
Matrix inversion – example
1 −1 2 [A ]= 3 0 1 ; 1 0 2 1 −1 2 1 0 3 0 1 0 1 1 0 2 0 0 Augment matrix A with the identity matrix 0 → Multiply row 1 by 3 and 0 subtract it from row 2 and subtract row 1 from 1 row 3
CE 221 CE MATRIX OPERATIONS
Matrix inversion – example (continued) (continued) Matrix 1 − 2 1 [ ]= 3 0 1 → A 1 0 2 Augment the matrix with the identity matrix 1 − 2 1 0 0 1 Multiply row 1 by 3 and → subtract it from row 2 and 3 0 1 0 1 0 subtract row 1 from row 3 1 0 2 0 0 1 CE 221 CE MATRIX OPERATIONS
Matrix inversion – example (continued) (continued) Matrix 1 0 0 1 0 0 − 2 1 0 0 1 → Interchange rows 3 and 2 3 − − 1 0 53 1 0 − 0 1 1 − 2 1 0 0 1 − 0 1 → Multiply row 1 by 3 and add 10 1 it to row 3 3 − − 1 0 53 CE 221 CE MATRIX OPERATIONS
Matrix inversion – example (continued) (continued) Matrix 1 0 0 1 0 0 − 1 1 0 1 0 0 − 0 1 → 1 0 1 − 3 − 2 1 0 0 1 1 0 − 0 1 → 1 1 3 −− 010 5 5 2 0 − 5 Divide row 3 by 5 Add row 2 to row 1 and multiply row 3 by 2 and subtract it from row 1 CE 221 CE MATRIX OPERATIONS
Matrix inversion – example (continued) (continued) Matrix 1 0 0 0 1 0 0 0 1 0 −1 0 0 −1 0 2 − 5 0 1 − 5 1 − The 3 by 3 matrix on the 5 1 → right hand side is the 3 inverse [A]1 of matrix − 5 [A] 2 1 − − 5 5 0 1 = [A]1 1 3 − − 5 5 CE 221 CE MATRIX OPERATIONS
Matrix inversion using cofactors [S ] −1 = [ Co ]T
S where [Co] is a matrix consisting of cofactors Coij of the elements of [S]. For a 2nd order matrix S11 [S ]= S21 S11 [S]1 = S21 S12 S22 − 1 ⇒ S 22 [ Co ] = − S12 − S 21 S11 ; Hence
−S12 S11 S22 S12 1 = −S12 S21 ) −S21 S22 ( S11 S22 CE 221 CE MATRIX OPERATIONS
Third order matrix inversion using cofactors
3 [S ] = 7 9 11 7 7 = − 7 7 11 7 11 7
7 9 9 9 9 7 9 7 9 − 3 9 − 3 7 7 9 ⇒ 7 9 9 9 9 7 − 7 9 3 9 3 7 11 7 7 7 7 11 [ Co ] 50 = 0 − 50 0 − 54 42 − 50 42 − 16 [S ]−1 T = 1 [Co ] S 50 1 = 0 ( −300 ) − 50 CE 221 CE 0 − 54 42 − 50 42 −16 MATRIX OPERATIONS
Matrix inversion All nonsingular square matrices are All invertible. invertible. If the product of two square matrices is the If identity matrix, the matrices are inverses. identity Singular matrices do not have an inverse. If Ax = b, then A1Ax = A1b and x = A1b CE 221 CE MATRIX APPLICATION Simultaneous equations
Consider the following simultaneous equations
4x1  2x2 + x3 = 15 3x1  x2 +4x3 = 8 x1 x2 + 3x3 = 13 The matrix notation is as follows: 4 − 3 1 −2 1 x1 15 4 = − −1 4 x2 8 or 3 1 −1 3 x3 13 CE 221 CE −2 1 15 −1 4 8 −1 3 13 MATRIX APPLICATION Simultaneous equations
Multiplying row 1 by 3 and adding it to 4 times row 2 yields 4 0 0 15 −10 19 77 −2 11 37 1 −2 Multiplying row 3 by 10 and subtracting it from 2 times row 2 yields Multiplying 4 0 0 −2 −10 0 1 15 19 77 −72 216 CE 221 CE MATRIX APPLICATION Simultaneous equations
Subtracting row 2 from 5 times row 1 yields 0 14 2 20 0 −10 19 77 0 0 72 216 Multiplying row 3 by (14/72) and subtracting it from row 1and multiplying row 3 by (19/72) and adding it to row 2 yields 20 0 0 −10 0 0 0 40 0 20 −72 216 CE 221 CE MATRIX APPLICATION Simultaneous equations
The last matrix represents the following equations: 20x1 = 40 20x  10x2 = 20 72x3 = 216 72x Solving the equations yields: X1 = 2 X2 = 2 XCE = 3 CE 221 3 ...
View
Full
Document
This note was uploaded on 10/31/2010 for the course CEE CE 221 taught by Professor Baladi during the Fall '10 term at Michigan State University.
 Fall '10
 Baladi

Click to edit the document details