230 likes | 362 Views
ENGR-1100 Introduction to Engineering Analysis. Lecture 11. Matrix and Matrix operation Rules of matrix arithmetic. Lecture Outline. 2 2 -2 0 -1 -1. 2 2 p -2 0 sin(2) -1 -1 e. 2 2 p -3. Definition: A matrix is a rectangular array of numbers.
E N D
Matrix and Matrix operation Rules of matrix arithmetic Lecture Outline
2 2 -2 0 -1 -1 2 2 p -2 0 sin(2) -1 -1 e 2 2 p -3 Definition: A matrix is a rectangular array of numbers The size of the matrix nxm. Where n the number of rows and m the number of columns.
2 2 -2 0 -1 -1 A= C= a11 a12….… a1n a21 a22….… a2n : : : an1 an2….… ann 2 2 p -3 A= • Capital letters denote matrices • Lower case letters denote numerical quantities In a square matrix m=n a11, a22….… ann are on the main diagonal
Matrix are said to be equal if they have the same size, and the corresponding entries in the two matrices are equal. 2 2 -2 0 -1 -1 1 2 -2 0 3 -1 2 2 1 -2 0 2 -1 -1 2 A= B= C= A=B; B=C; A=C Definition 1: Equal Matrices
2 2 -2 0 -1 -1 1 2 -2 0 3 -1 2 2 1 -2 0 2 -1 -1 2 A= B= C= 3 4 -4 0 2 -2 Definition 2: Sum of Matrices • If A and B are any two matrices of the same size, then the sum A+B is the matrix obtained by adding together the corresponding entries in the two matrices. Matrices of different sizes can’t be added. A+C and B+C are undefined A+B=
2 2 -2 0 -1 -1 4 4 -4 0 -2 -2 A= -2 -2 2 0 1 1 (-1)A=-A= Definition 3: Matrix Scalar Product • If A is any matrix and c any scalar, then the product c.A is the matrix obtained by multiplying each entry of A by c. 2A=
1 4 3 • 0 -1 3 1 • 2 7 5 2 1 2 4 2 6 0 A= B= Definition 4: Product of two matrices A . B =?
The size of a product matrix A B A.B = m x rr x nm x n inside outside
4 0 2 1 -1 7 4 3 5 3 1 2 1 2 4 = 2 6 0 26 c14 4 0 2 1 -1 7 4 3 5 3 1 2 13 1 2 4 = 2 6 0 26 (1x3)+(2x1)+(4x2)=13 2 x 4 3 x 4 2 x 3 c23 = a21xb13+a22xb23+a23xb33 (2x4)+(6x3)+(0x5)=26
4 0 2 1 -1 7 4 3 5 3 1 2 13 1 2 4 = 2 6 0 26 12 27 30 13 A.B = 8 -4 26 12 Class Assignment: Complete the product computation
3 0 -1 2 1 1 4 -1 0 2 3 x 2 2 x 2 B= Matrix size 3 x 2 A= 12 -3 -4 5 4 1 inside A.B= outside Class Assignment Problem:Set 1.4-4a: determineA.B
1 5 2 -1 0 1 3 2 4 6 1 3 -1 1 2 4 1 3 D= E= 3 x 3 3 x 3 Matrix size 3 x 3 inside outside 9 8 19 -2 0 0 32 9 25 D.E= Class Assignment Problem:Set 1.4-4d: Determine D.E
1 5 2 -1 0 1 3 2 4 6 1 3 -1 1 2 4 1 3 D= E= 3 x 3 3 x 3 Matrix size 3 x 3 inside outside 14 36 25 4 -1 7 12 26 21 D.E= Class Assignment Problem:Set 1.4-4e: DetermineE.D
6 5 • -2 1 3 • 7 3 7 D+E= Class Assignment Problem:Set 1.4-4b: DetermineD+E 1 5 2 -1 0 1 3 2 4 6 1 3 -1 1 2 4 1 3 D = E =
-1 0 2 3 1 2 3 0 A= B= -1 -2 11 4 3 6 -3 0 A.B= B.A= Therefore: A.B=B.A Rules of Matrix Arithmetic Multiply A.B: Multiply B.A
(1) A+B=B+A (2) A+(B+C)=(A+B)+C (3) A(BC)=(AB)C (4) A(B+C)=AB+AC (5) (B+C)A=BA+CA (6) A(B-C)=AB-AC (7) (B-C)A=BA-CA (8) a(B+C)=aB+aC (9) a(B-C)=aB-aC (10) (a+b)C=aC+bC (11) (a-b)C=aC-bC (12) (ab)C=a(bC) (13) a(BC)=(aB)C=B(aC) The following rules of matrix arithmetic are valid(assuming that the sizes of the matrices are such that the indicated operations can be performed)
Transpose of a Matrix, At a11 a12 a13 a14 a21 a22 a23 a24 A= a31 a32 a33 a34 a11 a12 a13 a14 a21 a22 a23 a24 a31 a32 a33 a34 At=
1 0 0 1 I2= 1 0 0 0 I3= 0 1 0 0 0 0 1 0 0 0 0 1 I4= 1 0 0 0 1 0 0 0 1 Identity Matrix:A square matrix with 1’s on the main diagonal and 0’s off the main diagonal If A is an mxn matrix, then: AIn=A and ImA=A
3 5 1 2 3 5 1 2 2 -5 -1 3 2 -5 -1 3 1 0 0 1 1 0 0 1 2 -5 -1 3 A= A.B= = = I B.A= = Inverse of a MatrixIf Ais a square matrix, and a matrixBissuch thatA.B=B.A=I, thenAis said to be invertible andBis called the inverse ofA 3 5 1 2 is the inverse of B=A-1= = I
x(-1) x(-1) a b c d d -b -c a A= 1 ad-bc A-1= = d ad-bc -b ad-bc -c ad-bc a ad-bc How to find the inverse matrix? For a 2x2 matrix If ad-bc=0 then
Using the formula: 3 -2 -1 1 1 2 1 3 d -b -c a d -b -c a A= Since: ad-bc=3-2=1 1 ad-bc A-1= = A-1= = -c ad-bc a ad-bc -b ad-bc d ad-bc Find the inverse of: a=1; b=2; c=1; d=3
3 4 5 6 A-1= Class Assignment Problem:Set 1.5-6: Let A be an invertable matrix whose inverse is: Find the matrix A