MATH 37 Matrices Dr. Neal, WKU A m matrix A = (a i j ) is a array of m umbers arraged ito m rows ad colums, where a i j is the etry i the ith row, jth colum. The values m are called the dimesios (or size) of the matrix. If the dimesios are, the A is called a square matrix. For aother m matrix B = (b i j ), we say A = B iff a i j = b i j for all i, j. A = 4 A is a 3 matrix; a = ad a 3 = 6 4 B = 3 3 5 B is a 3 4 matrix; b 3 = 3 ad b 4 = 3 4 3 G = 5 6 8 5 G is a square matrix with dimesios 3 3 Scalar Multiplicatio Let A = (a i j ) be a m matrix ad let c be a real umber. (Heceforth, a idividual real umber will be called a scalar.) We defie scalar multiplicatio to be the product of the scalar c with the matrix A give by c A = (c a i j ). That is, we simply multiply every etry i A by the value c. For A as give above, the 3A = 3 4 6 3 =. 9 8 Matrix Additio Let A = (a i j ) ad B = (b i j ) both be m matrices. The we defie the sum A + B by A + B = (c i j ), where c i j = a i j + b i j or A + B = (a i j + b i j ). That is, if A ad B have the same dimesios, the we ca add A ad B ad we do so by addig their etries term by term: Example. 4 + 3 5 6 = 5 4 4 6 The operatios of scalar multiplicatio ad matrix additio make the set of all m matrices a vector space over the set of real umbers. I this cotext, a m matrix is called a vector ad the real umbers are the scalars. A special case is the set of matrices, which are more ofte called the set of vectors i -dimesioal space, or R : (x x... x )
Properties of Scalar Multiplicatio. Closure: If A is m, the c A is also m for every scalar c.. Scalar Multiplicative Idetity: A = A for all m matrices A. 3. Associative: c(d A) = (c d )A for all scalars c ad d ad all m matrices A. 4. Scalar Distributio: c(a + B) = c A + c B for all scalars c ad all m matrices A, B. 5. Matrix Distributio: (c + d) A = c A + d A for all scalars c, d ad all m matrices A. Properties of Matrix Additio. Closure: If A ad B are m, the A + B is also m.. Commutative: A + B = B + A for all m matrices A ad B. 3. Associative: A + (B + C) = (A + B) + C for all m matrices A, B, ad C. 4. Additive Idetity: A + = A for all m matrices A, where is the m Zero matrix that has a for each etry. 5. Additive Iverse: A is the scalar product ( )A ad A + ( A) = for all m matrices A. We defie matrix subtractio by A B = A + ( B) = (a i j b i j ), which is doe by subtractig etries term by term. Note: A = B if ad oly if A B =. Matrix Multiplicatio Let A = (a i j ) be a m matrix, ad let B = (b i j ) be a p matrix. Because the umber of colums i A equals the umber of rows i B, we ca defie the matrix product AB (i that order) to be a m p matrix give by AB = C = (c i j ), where c i j = a i k b k j. Example. 3 4 A = 4 4 B = 3 D = 5 3 5 6 3 3 4 4 A B B D D A 3 3 4 3 4 4 4 3 # of cols i A equals # rows i B, so AB is defied ad is 4 # of cols i B equals # of rows i D, so BD is defied ad is 3 # of cols i D equals # of rows i A, so DA is defied ad is 4 3 Note: With these matrices, BA, DB, ad AD are ot defied.
Now how do we compute a matrix product? Cosider A ad B as above, ad let C = AB be its 4 product. C = AB = c c c 3 c 4 c c c 3 c 4 Dr. Neal, WKU To fid c i j, use the ier product of the ith row of A with the jth colum of B. A = 4 4 B = 3 3 5 4 c = () + ( )() + 4( ) = 8 4 4 3 c = (4) + ( )() + 4(3) = 4 5 c 3 = () + ( )() + 4(5) = 3 4 3 c 4 = () + ( )( 3) + 4() = 3 6 c = () + 3() + 6( ) = 6 3 6 4 3 c = (4) + 3() + 6(3) =8 3 6 5 c 3 = () + 3() + 6(5) = 33 3 6 3 c 4 = () + 3( 3) + 6() = 3 8 3 C = AB = 6 8 33 3 Note: To avoid this tedious maual labor, you should lear how to eter matrices ito your calculator usig the MATRIX EDIT scree. You ca the recall matrices to the HOME scree from the MATRIX NAMES meu. With A, B, ad D defied as i Example, use your calculator to verify that BD = 8 4 7 3 6 8 4 3 ad DA = 3. 7 4
Idetity Matrix The idetity matrix, deoted I, is the matrix with all s dow the mai diagoal ad s everywhere else: I = (e i j ), where e i i = ad e i j = for i j. I = I 3 = I 4 = Theorem.. Let A = (a i j ) be a m matrix. The I m A = A ad A I = A. Proof. Because I m has m colums which equals the umber of rows i A, the product I m A is defied. Moreover, I m A is m (the umber of rows i I m by the umber of colums i A). So I m A has the same dimesios as A. m Now let I m A = C = (c i j ), where c i j = e i k a k j. If k i, the e i k =, ad e i i = ; hece, c i j simplifies to c i j = e i i a i j = a i j. Because their etries are equal for all i, j, we have C = A. Now cosider A I, which is defied because A has colums which equals the umber of rows i I. Moreover, A I is m which is the same size as A. Now let A I = D = (d i j ), where d i j = a i k e k j. If k j, the e k j =, ad e j j = ; hece, d i j simplifies to d i j = a i j e j j = a i j. Because their etries are equal for all i, j, we have D = A. Example 3. Let A = 4, which is 3. The I 3 6 A = A = A I 3. That is, 4 4 4 = = 3 3 3 3 3
Other Properties of Matrix Multiplicatio. Associative: A(BC) = (AB)C, wheever A is m, B is p, ad C is p q.. Distributive: A(B + C) = AB + AC wheever A is m ad B, C are p. 3. Distributive: (A + B)C = AC + BC wheever A, B are m ad C is p. 4. Scalar Associative: c(ab) = (ca)b = A(cB) for all scalars c wheever A is m, B is p. Proof of. Let A = (a i j ), B = (b i j ), ad C = (c i j ). The B + C = (b i j + c i j ) ad A(B + C) = D = (d i j ), where d i j = a i k (b k j + c k j ) = a i k b k j + a i k c k j = a i k b k j + a i k c k j = f i j, k = k = where ( f i j ) = AB + AC. Defiitio. A square matrix A = (a i j ) is called diagoal if a i j = wheever i j. Theorem.. Let A = (a i j ) ad B = (b i j ) both be diagoal square matrices. The AB = BA = (c i j ), where c i i = a i i b i i ad c i j = for i j. That is, AB = BA ad this product is a diagoal matrix with its diagoal etries beig the product of the diagoal etries i A ad B. Proof. Because A ad B are both, the products AB ad BA are both defied ad are. Because A ad B are diagoal, the a i j = ad b i j = wheever i j. Now let AB = C = (c i j ), where c i j = a i k b k j. Wheever k i, the a i k = ; hece, c i j simplifies to c i j = a i i b i j. Now if j i, the b i j = ad so c i j =. If j = i, the c i i = a i i b i i. A aalogous argumet shows the result as well for the product BA. 3 6 Example 4. Let A = 4 ad B =. The AB = 8 = BA. 3 4 Note: Whever A ad B are both, the the products AB ad BA are both defied. However, it is geerally the case that AB BA. (Create your ow example with some matrices!) So matrix multiplicatio is o-commutative.
Traspose Let A = (a i j ) be a m matrix. We defie A traspose deoted by A T to be a m matrix defied by A T = ( a i ʹ j ), where a i ʹ j = a j i. That is, we simply take rows of A ad make them the colums of A T (or take the colums of A ad make them the rows of A T ). A square matrix A is called symmetric if A T = A, which meas that a i j = a j i for all i, j. Example 5. Let A = 4 4 3 G = 5 6 8 5 3 5 6 4 H = 3 8 9 5 4 9 The A T = 3 4 6 4 5 8 G T = 5 3 6 ad H T = H, so H is symmetric. Quick Facts: (i) (A T ) T = A (The traspose of the traspose gives back the origial A.) (ii) (ca) T = c( A T ) ad ( A + B) T = A T + B T. Fact (ii) meas that traspose is a liear operator o the set of matrices (i.e., costats factor out ad traspose is additive.) You have see other liear operators such as the itegral operator o the set of cotiuous fuctios f. With itegratio, we have c f (x ) dx = c f (x )dx ad ( f ( x) + g( x) ) dx = f (x )dx + g( x) dx ; that is, costats factor out ad itegratio is additive. Other liear operators iclude differetiatio o the set of differetiable fuctios ad summatio o the set of ifiite series. Theorem.3. Let A be a m matrix. The AA T ad A T A are both defied ad are square matrices. Proof. Because A is m, the A T is m. So the umber of colums i A equals the umber of rows i A T ; thus, AA T is defied ad is m m, (the umber of rows i A by the umber of colums i A T ). Because A T is m ad A is m, the umber of colums i A T equals the umber of rows i A. So A T A is defied ad is (the umber of rows i A T by the umber of colums i A).