🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Full Transcript

Chapter 2 Matrices Chapter 2 Matrices 2.1 Matrices Definition of a matrix Definition 2.1.1. An m × n matrix A is a rectangular array of mn numbers arranged in m rows and n columns: (2.1.1)...

Chapter 2 Matrices Chapter 2 Matrices 2.1 Matrices Definition of a matrix Definition 2.1.1. An m × n matrix A is a rectangular array of mn numbers arranged in m rows and n columns: (2.1.1) ( ) a 11 a 12 ⋯ a 1n a 21 a 22 ⋯ a 2n A=. ⋮ ⋮ ⋱ ⋮ a m1 a m2 ⋯ a mn The ijth component of A, denoted a ij, is the number appearing in the ith row and jth column of A. a ij, is called an (i, j)-entry of A, or entry or element of A if there is no confusion. Sometimes, it is useful to write A = (a ). Capital letters are usually applied to denote matrices. m × n is called the size of A. … 1/15 Chapter 2 Matrices Let (2.1.2) () () () a 11 a 12 a 1n → a 21 a 22 → a 2n → a1 = , a= , ⋯, a n =. ⋮ ⋮ ⋮ a m1 a m2 a mn → → → The vectors a 1, a 2, ⋯, a n are called the column vectors of the matrix A. We can rewrite the matrix A as (2.1.3) → → → A = (a 1, a 2, ⋯, a n). Let (2.1.4) → r 1 = (a 11, a 12, ⋯, a 1n), → r 2 = (a 21, a 22, ⋯, a 2n), ⋮ → r m = (a m1, a m2, ⋯, a mn). … 2/15 Chapter 2 Matrices → → → The vectors r 1 , r 2 , ⋯, r m are called the row vectors of A. We can rewrite the matrix A as (2.1.5) () → r1 → r2 A=. ⋮ → rm → → → → → → Note that a 1, a 2, ⋯, a n are in ℝ while r 1 , r 2 , ⋯, r m are in ℝ m. m Example 2.1.1. The size of A = (2) is 1 × 1, the size of ( ) 1 2 3 4 is 2 × 2, the size of ( 1 2 3 4 −1 0 ) is 2 × 3, and the size of ( ) 0 0 0 0 0 0 is 4 × 3. 0 0 0 0 0 0 Example 2.1.2. … 3/15 Chapter 2 Matrices ( ) 1 0 0 1 Let A = 2 2 1 1. Use the column vectors and the row vectors of A to rewrite A. 0 1 2 4 Solution Let () () () () 1 0 0 1 → → → → a1 = 2 , a2 = 1 , a3 = 1 , and a 4 = 1. 0 2 2 4 →→→→ Then A can be rewritten as A = (a 1 a 2 a 3 a 4). () → r1 → → → → Let r 1 = (1, 0, 0, 1), r 2 = (2, 2, 1, 1), and r 3 = (0, 1, 2, 4). Then A can be rewritten as A = r2. → r3 Definition 2.1.2. 1. An m × n matrix is called a zero matrix if all entries of A are zero. 2. A 1 × n matrix is called a row matrix. 3. An m × 1 matrix is called a column matrix. … 4/15 Chapter 2 Matrices Sometimes, we denote by 0 a zero matrix if there is no confusion. A 1 × n matrix and an m × 1 matrix can be treated as a row vector and a column vector, respectively. Example 2.1.3. 1. The following are zero matrices. ( ) 0 0 0 A = (0), B= ( 0 0 0 0 0 0 ) , and C= 0 0 0 0 0 0. 0 0 0 2. (0 0 0) is a 1 × 3 row matrix and (1 3 5 7) is a 1 × 4 row matrix. () 0 () 2 0 3. is a 4 × 1 column matrix and 1 is a 3 × 1 column matrix. 0 3 0 Transpose of a matrix Let A = (a ij) bean m × n matrix defined in (2.1.1). The transpose of A, denoted by A T, is the n × m matrix obtained by interchanging the rows and columns of A. Hence, A T = (a ji) or (2.1.6) : 100% … 5/15 Chapter 2 Matrices ( ) a 11 a 21 ⋯ a m1 a 21 a 22 ⋯ a m2 T A =. ⋮ ⋮ ⋱ ⋮ a 1n a 2n ⋯ a mn From (2.1.6) , we see that the ith column of A T and the ith row of A are the same. It is obvious that (A ) T T = A. Example 2.1.4. Find the transposes of the following matrices: ( ) 7 9 A = (8) B = (1 3 5) C= 18 31. 52 68 Solution () 1 A T = (8), B T = 3 , CT = 5 7 18 52 9 31 68 (. ) Operations on matrices Definition 2.1.3. … 6/15 Chapter 2 Matrices Two matrices A and B are said to be equal if the following conditions hold: 1. A and B have the same size. 2. All the corresponding entries are the same. If A and B are equal, then we write A = B. Let A = (a ij) and B = (b ij) be two m × n matrices. Then A = B if and only if a ij = b ij for all i ∈ I m and j ∈ I n. Example 2.1.5. Let A = ( ) 2 3 x2 1 and B = ( ) 2 1 3 4. Find all x ∈ ℝ such that A = B. Solution Note that A and B have the same size. Hence, if x 2 = 4, then A = B. This implies that when x = 2 or x = − 2, A = B. Example 2.1.6. Let A = ( a 2x + y b 4x + 3y ) and B = ( ) 1 1 3 6. Find all a, b, x, y ∈ ℝ such that A = B Solution Note that A and B have the same size. Hence, A = B if a = 1, b = 3, and x, y satisfy the following system. { 2x + y = 1, 4x + 3y = 6. … 7/15 Chapter 2 Matrices Solving the above system, we obtain x = − 3 / 2 and y = 4. Hence, when a = 1, b = 3, x = − 3 / 2, and y = 4, A = B. Example 2.1.7. Let A = (1 2) and B = () 1 2 be two matrices. Determine if A = B. Solution The sizes of A and B are 1 × 2 and 2 × 1 respectively. Because A and B have different sizes, A ≠ B. Note that in Example 2.1.7 , if we treat A and B as vectors, then they are equal vectors. Definition 2.1.4. Let A = (a ij), B = (b ij) be m × n matrices and k a real number. We define ( ) a 11 + b 11 a 12 + b 12 ⋯ a 1n + b 1n a 21 + b 21 a 22 + b 22 ⋯ a 2n + b 2n Addition: A + B =. ⋮ ⋮ ⋱ ⋮ a m1 + b m1 a m2 + b m2 ⋯ a mn + b mn ( ) a 11 − b 11 a 12 − b 12 ⋯ a 1n − b 1n a 21 − b 21 a 22 − b 22 ⋯ a 2n − b 2n Subtraction: A − B =. ⋮ ⋮ ⋱ ⋮ a m1 − b m1 a m2 − b m2 ⋯ a mn − b mn … 8/15 Chapter 2 Matrices ( ) ka 11 ka 12 ⋯ ka 1n ka 21 ka 22 ⋯ ka 2n Scalar multiplication: kA =. ⋮ ⋮ ⋱ ⋮ ka m1 ka m2 ⋯ ka mn Example 2.1.8. Let A= ( 3 4 2 −3 0 2 ) and B = ( −4 5 1 −6 1 0 ). Compute i. A + B; ii. A − B; iii. − A iv. 3A. Solution i. A + B = ( 3−4 4+1 2 + 5 −3 − 6 0 + 1 2+0 ) ( = −1 7 5 −9 1 2 ). ii. A − B = ( 3 − ( − 4) 2−5 4−1 − 3 − ( − 6) 0 − 1 2−0 ) (= 7 −3 3 −1 3 2 ). … 9/15 Chapter 2 Matrices iii. − A = ( ( − 1)(3) ( − 1)(4) ( − 1)(2) ( − 1)(2) ( − 1)( − 3) ( − 1)(0) ) ( = −3 −4 −2 −2 3 0 ). iv. 3A = ( (3)(3) (3)(4) (3)(2) (3)( − 3) (3)(0) (3)(2) ) ( = 9 12 6 6 −9 0 ). The following result can be easily proved and its proof is left to the reader. Theorem 2.1.1. Let A, B, and C be m × n matrices and let α, β ∈ ℝ. Then 1. A + 0 = A, 2. 0A = 0, 3. A + B = B + A, 4. (A + B) + C = A + (B + C), 5. α(A + B) = αA + αB, 6. (α + β)A = αA + βA, 7. (αβ)A = α(βA), 8. 1A = A, 9. (A + B) T = A T + B T, 10. (A − B) T = A T − B T, 11. (αA) T = αA T. Example 2.1.9. Let 10/15 Chapter 2 Matrices ( ) ( ) ( ) 1 0 1 1 2 3 1 0 0 A= 2 1 1 B= 0 0 0 C= 0 1 1 0 0 2 1 4 2 0 0 2 Compute 2A − B + C and [2(A + B)] T. Solution 2A − B + C = (2A − B) + C [ ( ) ( )] ( ) 1 0 1 1 2 3 1 0 0 = 2 2 1 1 − 0 0 0 + 0 1 1 0 0 2 1 4 2 0 0 2 [( ) ( )] ( ) 2 0 2 1 2 3 1 0 0 = 4 2 2 − 0 0 0 + 0 1 1 0 0 4 1 4 2 0 0 2 ( )( )( ) 1 −2 −1 1 0 0 2 −2 −1 = 4 2 2 + 0 1 1 = 4 3 3. −1 −4 2 0 0 2 −1 −4 4 [2(A + B)] T = 2(A + B) T = 2(A T + B T) [( ) ( )] ( ) ( ) 1 2 0 1 0 1 2 2 1 4 4 2 =2 0 1 0 + 2 0 4 =2 2 1 4 = 4 2 8. 1 1 2 3 0 2 4 1 4 8 2 8 11/15 Chapter 2 Matrices Example 2.1.10. Find the matrix A if [ ( )] ( ) T 2A − 1 2 −1 0 T T = 0 0 −1 1. Solution Because [ ( )] 2A T − 1 2 −1 0 T T = (2A T) − T [( ) ] 1 2 −1 0 T T = 2(A T) − T ( ) 1 2 −1 0 = 2A − ( ) 1 2 −1 0 , we obtain 2A − ( ) ( ) 1 2 −1 0 = 0 0 −1 1 and 2A = ( )( ) ( ) 0 0 −1 1 + 1 2 −1 0 = 1 2 −2 1. 12/15 Chapter 2 Matrices ( ) 1 1 Hence, A = 1 2 ( ) 1 2 −2 1 = 2 1 −1 2. Exercises 1. Find the sizes of the following matrices: ( ) 1 0 0 A = (2) B = ( ) ( 5 8 1 4 C= 10 3 8 10 3 4 ) D= 0 10 0 0 2 1 6 9 10 2. Use column vectors and row vectors to rewrite each of the following matrices. ) ( ) 9 8 7 ( ) ( 3 3 2 1 9 7 2 6 5 4 A= 1 8 1 B= 3 10 8 7 C= 3 2 1 5 4 10 4 3 10 4 0 −1 −2 3. Find the transposes of the following matrices: () ( ) 33 3 9 − 19 C = (4) B = ( 3 11 2 ) C= 8 D= −2 8 −7 12 5 3 −9 4. Let A = ( ) 9 6 x2 3 and B = ( ) 9 3 6 4. Find all x ∈ ℝ such that A = B. 13/15 Chapter 2 Matrices 5. Let C = ( 12 5 25 19 4 6 ) and D = ( 12 5 x 2 19 4 6 ). Find all x ∈ ℝ such that C = D. ( ) ( ) 120 25 122 120 x2 122 6. Let E = 123 124 125 and F = 123 124 x3. Find all x ∈ ℝ such that E = F. 126 127 128 26x − 4 127 128 7. Let A = ( a 3x + 2y − x + y b ) and B = ( ) 1 1 3 6. Find all a, b, x, y ∈ ℝ such that A = B. 8. Let C= ( a+b x − 2y 5x + 3y 2b − a ) and D = ( ) 6 8 14 0. Find all a, b, x, y ∈ ℝ such that C = D. 9. Let A = ( −2 6 3 −1 −8 4 ) and B = ( 7 −8 9 0 −1 0 ). Compute i. A + B; ii. − A; iii. 4A − 2B; iv. 100A + B. ( ) ( ) ( ) 9 5 1 2 2 2 4 7 0 10. Let A = 8 0 0 , B= 0 0 0 , and C = 0 3 1. 0 3 2 4 6 8 0 0 2 Compute 14/15 Chapter 2 Matrices 1. 3A − 2B + C, 2. [3(A + B)] T, ( 1 3. 4A + 2 B − C ) T. 11. Find the matrix A if [( ) ( ) ] ( 3A T − −7 −2 −6 9 T T = − 5 − 10 33 12 ). 12. Find the matrix B if [ ( )] ( ) 6 3 T −5 6 T 1 2 B+ 8 3 1 4 −3 8 −4 −9 2 = ( 23 − 16 17 − 16 26.5 2 ). : 100% 15/15 2.2 Product of two matrices 2.2 Product of two matrices Product of a matrix and a vector Definition 2.2.1. and X = (x 1, ⋯, x n) T. The product AX of A and X is defined by → → → Let A be the same as in (2.1.1) ( )( ) ( ) a 11 a 12 ⋯ a 1n x1 a 11x 1 + a 12x 2 + ⋯ + a 1na n a 21 a 22 ⋯ a 2n x2 a 21x 1 + a 22x 2 + ⋯ + a 2nx n =. ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ a m1 a m2 ⋯ a mn xn a m1x 1 + a m2x 2 + ⋯ + a mnx n → → Note that AX is a vector in ℝ m, where m is the number of rows of A while X is a vector in ℝ n, where n is the → → number of columns of A. AX is called the image of X under A. → → We denote by A(ℝ n) the set of all the vectors AX as X varies in ℝ n, that is, (2.2.1) A(ℝ n) = { AX ∈ ℝ → → m: X ∈ ℝn. } By Definition 2.2.1 , we see … 1/22 2.2 Product of two matrices (2.2.2) )( ) → ( → r1 ⋅ X a 11x 1 + a 12x 2 + ⋯ + a 1nx n → a 21x 1 + a 22x 2 + ⋯ + a 2na x → → r2 ⋅ X AX = = , ⋮ ⋮ a m1x 1 + a m2x 2 + ⋯ + a mnx n → → rm ⋅ X → → → where r 1 , r 2 , ⋯, r m are the row vectors of A given in (2.1.4). Example 2.2.1. ( ) () () x1 1 0 ( ) 1 2 0 → → → → Let A = → , X= x2 , X1 = 2 , and X = → 2. Compute AX, AX 1, and AX 2. 3 −1 4 2 x3 1 2 Solution → → Let r 1 = (1, 2, 0) and r 2 = (1, − 3, 4) be the row vectors of A. Then … 2/22 2.2 Product of two matrices () x1 → r 1 ⋅ X = (1, 2, 0) x 2 → = (1)(x 1) + (2)(x 2) + (0)(x 3) = x 1 + 2x 2 x3 and () x1 → r 2 ⋅ X = (1, − 3, 4) x 2 → = (3)(x 1) + ( − 1)(x 2) + (4)(x 3) = 3x 1 − x 2 + 4x 3. x3 Hence, ()( ) x1 → ( ) → ( ) 1 2 0 r1 ⋅ X x 1 + 2x 2 → AX = x2 = =. 3 −1 4 → 3x 1 − x 2 + 4x 3 x3 → r2 ⋅ X → We can rewrite AX in a simple way. … 3/22 2.2 Product of two matrices ()( x1 → AX = ( 1 2 3 −1 4 0 ) x2 x3 = (1)(x 1) + (2)(x 2) + (0)(x 3) (3)(x 1) + ( − 1)(x 2) + (4)(x 3) ) = ( x 1 + 2x 2 3x 1 − x 2 + 4x 3 ). )( ) ( 1 ( ) () → 1 2 0 (1)(1) + (2)(2) + (0)(1) 5 AX 1 = 2 = =. 3 −1 4 (3)(1) + ( − 1)(2) + (4)(1) 5 1 )( ) ( 0 ( ) () → 1 2 0 (1)(0) + (2)(2) + (0)(2) 4 AX 2 = 2 = =. 3 −1 4 (3)(0) + ( − 1)(2) + (4)(2) 6 2 Example 2.2.2. Let ( ) −4 1 () () 5 −1 → 1 0 → A= , X= and X 1 =. 3 0 1 4 2 4 … 4/22 2.2 Product of two matrices → → Compute AX and AX 1. Solution ( ) ( )() −4 1 ( − 4)(1) + (1)(1) −3 → AX = 5 3 −1 0 () 1 1 = (5)(1) + ( − 1)(1) (3)(1) + (0)(1) = 4 3. 2 4 (2)(1) + (4)(1) 6 ( )( ) ( )() −4 1 − 4(0) + (1)(4) 4 → 5 −1 0 (5)(0) + ( − 1)(4) −4 AX 1 = = =. 3 0 4 (3)(0) + (0)(4) 0 2 4 (2)(0) + (4)(4) 16 From (2.2.2) , a matrix and a vector can be multiplied together only when the number of columns of the → matrix equals the number of components of the vector. Hence, if the vectors →r i and X have a different → → number of components, then the scalar product r i ⋅ X is not defined. Example 2.2.3. Let … 5/22 2.2 Product of two matrices () 1 ( ) () −1 1 1 () → → 0 → 1 A= 2 −1 , X = 1 , X2 = , and X 3 =. 1 0 2 3 1 −1 4 → Determine whether A X i is defined for i = 1, 2, 3. Solution → → → AX 2 is defined, but AX 1 and AX 3 are not defined. Theorem 2.2.1. , X, Y ∈ ℝ n and α, β ∈ ℝ. → → Let A be the same as in (2.1.1) Then → → → ˉ + β(AY). A(αX + βY) = α(AX) Example 2.2.4. Let ( ) () () 1 1 0 1 0 → → A= 2 0 −1 , X = 2 , and Y = 1. 1 0 1 −1 −1 → → Compute A(2X + 3Y). … 6/22 2.2 Product of two matrices Solution → → → → A(2X + 3Y) = 2(AX) + 3(AY) ( )( ) ( )( ) 1 1 0 1 1 1 0 0 = 2 2 0 −1 2 + 3 2 0 −1 1 1 0 1 −1 1 0 1 −1 () ( ) () ( ) ( ) 3 1 6 3 9 = 2 3 +3 1 = 6 + 3 = 9. 0 −1 0 −3 −3 → → → → Let a 1, a 2, ⋯, a n be the column vectors of A given in (2.1.2). By (1.4.6) and (2.2.2) , AX can be expressed by a linear combination of these column vectors: (2.2.3) → → → → AX = x 1 a 1 + x 2 a 2 + ⋯ + x n a n. Example 2.2.5. ( ) () 1 2 3 2 → → Let A = 4 5 6 and X = 3. Write AX as a linear combination of the column vectors of A. 7 8 9 4 Jax]/jax/o Solution … 7/22 2.2 Product of two matrices () () () 1 2 3 → AX = 2 4 +3 5 +4 6. 7 8 9 The following result gives the relation between A(ℝ n) and the spanning space. Theorem 2.2.2. { } → → → Let S = a 1, a 2, ⋯, a n be the set of the column vectors of A given in (2.1.2). Then (2.2.4) A(ℝ n) = span S. Proof → → → → Let b = (b 1, b 2, ⋯, b m) T ∈ A(ℝ n). By (2.2.1) , there exists a vector X ∈ ℝ n such that TX = b. By (2.2.3) and (1.4.8) , → → → → → b = AX = x 1a 1 + x 2a 2 + ⋯ + x na n ∈ span S. → This shows that A(ℝ n) is a subset of span S. Conversely, if b ∈ span S, then by Theorem 1.4.3 , there → exists a vector X ∈ ℝ n such that → → → → b = x 1a 1 + x 2a 2 + ⋯ + x na n. … 8/22 2.2 Product of two matrices → → This, together with (2.2.3) and (2.2.1) , implies b = AX ∈ A(ℝ n). This shows that span S is a subset of A(ℝ n). We have shown that A(ℝ n). is a subset of span S and span S is a subset of A(ℝ n). Hence, (2.2.4) holds. Product of two matrices → → → Let A be the same as in (2.1.1) and r 1 , r 2 , ⋯, r m be the row vectors of A given in (2.1.4). Let ( ) b 11 b 12 ⋯ b 1r b 21 b 22 ⋯ b 2r Bn × r = ⋯ ⋯ ⋱ ⋯ b n1 b n2 ⋯ b nr and let () () () b 11 b 12 b 1r → b 21 → b 22 → b 2r b1 = , b2 = , ⋯, b r = ⋮ ⋮ ⋮ b n1 b n2 c nr be the column vectors of B. Definition 2.2.2. … 9/22 2.2 Product of two matrices The product AB of A and B is defined by (2.2.5) ( ) → → → → → → r1 ⋅ b1 r1 ⋅ b2 ⋯ r 1 ⋅ br → → → → → → AB = r2 ⋅ b1 r2 ⋅ b2 ⋯ r2 ⋅ br. ⋮ ⋮ ⋱ ⋮ → → → → → → rm ⋅ b1 rm ⋅ b2 ⋯ rm ⋅ br From Definition 2.2.5, we see that (2.2.6) ( ) → → → AB = Ab 1 Ab 2 ⋯ A b r and the size of AB is m × r The order for computing AB is to compute the first row → → → → → → r 1 ⋅ b 1, r 1 ⋅ b 2, ⋯, r 1 ⋅ b r then the second row 10/22 2.2 Product of two matrices → → → → → → r 2 ⋅ b 1, r 2 ⋅ b 2, ⋯, r 2 ⋅ b r and so on until the last row → → → → → → r m ⋅ b 1, r m ⋅ b 2, ⋯, r m ⋅ b r. Example 2.2.6. Let A= ( ) 1 −2 4 3 and B = ( 3 −2 0 5 6 0 ). Find AB and the sizes of A, B, and AB. The order of computing AB is to compute the first row of AB, (1 3) ( 3 −2 0 5 6 0 ) = ((1)(3) + (3)(5), (1)( − 2) + (3)(6), (1)(0) + (3)(0)) = (18, 16, 0) and then compute the second row of AB, (−2 4) ( 3 −2 0 5 6 0 ) = (( − 2)(3) + (4)(5), ( − 2)( − 2) + (4)(6), ( − 2)(0) + (4)(0)) = (14, 28, 0). 11/22 2.2 Product of two matrices Solution AB = ( )( ) 1 −2 4 3 3 −2 0 5 6 0 = ( (1)(3) + (3)(5) (1)( − 2) + (3)(6) (1)(0) + (3)(0) ( − 2)(3) + (4)(5) ( − 2)( − 2) + (4)(6) ( − 2)(0) + (4)(0) ) = ( ) 18 16 0 14 28 0. The sizes of A, B, and AB are 2 × 2, 2 × 3, 2 × 3, respectively. Example 2.2.7. Let ( ) 4 1 4 A= ( 1 2 4 2 6 0 ) and B = 0 −1 3. 2 7 5 Compute AB and find the sizes of A, B, and AB. The order of computing AB is to compute the first row of AB, 12/22 2.2 Product of two matrices ( ) 4 1 4 (1 2 4) 0 − 1 3 = ((1)(4) + (2)(0) + (4)(2), (1)(1) + (2)( − 1) + (4)(7), (1)(4) + (2)(3) + (4)(5) 2 7 5 = (12, 27, 30) and then compute the second row of AB, ( ) 4 1 4 (2 6 0) 0 − 1 3 = ((2)(4) + (6)(0) + (0)(2), (2)(1) + (6)( − 1) + (0)(7), (2)(4) + (6)(4) + (6)(3) + (0)(5) 2 7 5 = (8, − 4, 26). Solution By computation, we have )( ) 4 1 4 AB = ( 1 2 4 2 6 0 0 −1 3 2 7 5 = ( (1)(4) + (2)(0) + (4)(2) (1)(1) + (2)( − 1) + (4)(7) (1)(4) + (2)(3) + (4)(5) (2)(4) + (6)(0) + (0)(2) (2)(1) + (6)( − 1) + (0)(7) (2)(4) + (6)(3) + (0)(5) ) = ( 12 27 30 8 − 4 26 ). The sizes of , , and are 2 × 3, 3 × 3, and 2 × 3, respectively. 13/22 2.2 Product of two matrices Example 2.2.8. Let ( ) 7 −1 4 7 A= ( 2 0 −3 4 1 5 ) and B = 2 −3 5 1 0 −4. 2 3 Compute AB and find the sizes of A, B, and AB. We always follow the order like the above two examples to compute AB, but we do not need to mention the order every time when we compute AB. Solution )( )( 7 −1 4 7 AB = ( 2 0 −3 4 1 5 2 −3 5 1 0 −4 2 3 = 23 − 5 15 6 2 5 26 39 ). The sizes of A, B, and AB are 2 × 3, 3 × 4, , and 2 × 4, respectively. → In (2.2.6) , for each i = 1, 2, ⋯, r, the product A b i requires that the number of columns of the matrix A be → equal to the number of components of the vector b i. Hence, the product of two matrices A and B requires that the number of columns of A be equal to the number of rows of B. Symbolically, (2.2.7) (m × n)(n × r) = m × r. 14/22 2.2 Product of two matrices The inner numbers must be the same and the outer numbers give the size of the product AB. Hence, if the inner numbers are not the same, the product AB is not defined. Example 2.2.9. 1. Let A, B, and C be matrices such that AB = C. Assume that the sizes of A and C are 5 × 3 and 5 × 4. respectively. Find the size of B. 2. Let ( ) 1 0 A= 2 1 3 0 and B = ( ) 1 2 3 4. Are AB and BA defined? If so, compute them. If not, explain why. 3. Let A = ( ) 1 −2 4 3 and B = ( ) 3 −2 5 6. Are AB and BA defined? If so, compute them. If not, explain why. Is AB equal to BA? Solution 1. Because AB = C and the sizes of A and C are 5 × 3 and 5 × 4, respectively, by (2.2.7) , the size of B is 3 × 4, 2. The size of A is 3 × 2 and the size of B is 2 × 2. Hence, AB is defined because the number of columns of A and the number of rows of B are the same and equal 2. ( )( ) ( ) 1 0 1 2 1 2 AB = 2 1 = 5 8. 3 4 3 0 3 6 15/22 2.2 Product of two matrices BA is not defined because the number of columns of B is 2 and the number of rows of A is 3 and they are not the same. 3. AB and BA are defined because their sizes are 2 × 2. AB = ( )( ) ( 1 −2 4 3 3 −2 5 6 = 18 16 14 28 ) and BA = ( )( ) ( 3 −2 5 6 1 −2 4 3 = 7 − 7 39 1 ). Hence, AB ≠ BA. Following (2.2.6) , the following properties can be easily proved. The proofs are left to the reader. Theorem 2.2.3. The following assertions hold: 1. (Associative law for matrix multiplication) Let A : = A m × n, B : = B n × p and C : = C p × q. Then A(BC) = (AB)C. 2. (Distributive laws for matrix multiplication) i. Let A : = A m × n, B : = B n × p and C : = C n × q. Then A(B + C) = AB + AC. 16/22 2.2 Product of two matrices ii. Let A : = A m × n, B : = B m × n and C : = C n × q. Then (A + B)C = AC + BC. 3. (AB) T = B TA T. Example 2.2.10. Let ( ) 0 −2 1 A= ( ) ( 1 −3 0 2 , B= 2 −1 4 3 1 5 ) , and C = 4 −5 3 0 2. 6 Show that A(BC) = (AB)C and (AB) T = B TA T. Solution 17/22 2.2 Product of two matrices )( )( 0 −2 1 BC = ( 2 −1 4 3 1 5 4 −5 3 0 2 6 = − 24 − 7 24 − 21 − 3 35 ) A(BC) = ( )( ) (0 ) 1 −3 2 − 24 − 7 24 − 21 − 3 35 = 39 2 − 42 − 6 − 81 70 AB = ( )( ) ( 1 −3 0 2) 2 −1 4 3 1 5 = − 7 − 4 − 11 6 2 10 )( )( 0 −2 1 (AB)C = ( − 7 − 4 − 11 6 2 10 −5 4 3 0 2 6 = 39 − 42 − 6 2 − 81 70 ) Hence, A(BC) = (AB)C. ( )( ) ( )( ) 2 3 2−9 0+6 −7 6 1 0 B TA T = −1 1 = −1 − 3 0+2 = −4 2. −3 2 4 5 4 − 15 0 + 10 − 11 10 ( ) −7 6 (AB) T = ( − 7 − 4 − 11 6 2 10 ) T = −4 2. − 11 10 Hence, (AB) T = B TA T. 18/22 2.2 Product of two matrices Exercises ( ) () () x1 0 2 ( ) 2 1 1 → → → → 1. Let A = , X= → x2 , X1 = 1 , X = → 1. Compute AX, AX , and AX. 1 −1 2 2 1 2 x3 2 1 ( ) () −2 −1 () −a → 1 → → → 2. 2. A = 3 1 , X= , X1 =. Compute AX and AX 1. 2a 2 0 1 () 1 ( ) () 0 1 1 () → → 1 → 1 3. Let A = 1 − 1 , X1 = 0 , X2 = , X3 =. 0 1 2 1 −1 2 → Determine whether A X i. is defined for each i = 1, 2, 3. ( ) () () 0 1 0 1 3 → → → → 4. Let A = 1 0 −1 , X = 0 , Y= 0. Compute A(X − 3Y). 1 1 2 −1 −1 ( ) () 1 1 −1 1 → → 5. Let A = 1 0 2 and X = − 1. Write AX as a linear combination of the column vectors of A. 2 1 −1 0 6. We are interested in predicting the population changes among three cities in a country. It is known that in the current year, 20% and 30% of the populations of City 1 will move to Cities 2 and 3, respectively, 10% and 20% of the populations of City 2 will move to Cities 1 and 3, respectively, and 25% and 10% 19/22 2.2 Product of two matrices of the populations of City 3 will move to Cities 1 and 2, respectively. Assume that 200,000, 600,000, and 500,000 people live in Cities, 1, 2, and 3, respectively, in the currently year. Find the populations in the three cities in the following year. 7. Let A = ( ) 2 −2 3 1 and B = ( 1 −2 1 3 4 1 ). Find AB and the sizes of A, B, and AB. ( ) 2 1 −1 8. Let A = ( 0 1 −1 2 3 1 ) and B = 1 −1 2 0 1 4. Compute AB and find the sizes of A, B, and AB. ( ) 0 −1 2 1 9. Let A = ( 1 0 −2 3 2 −1 ) and B = −1 2 2 0 1 − 2. Compute AB and find the sizes of A, B, and AB. 0 1 ( ) 1 1 10. 10. Let A = 1 3 3 1 and B = ( ) 2 −2 3 1. Are AB and BA defined? If so, compute them. If not, explain why. 11. Let A = ( 2 −2 −1 3 ) and B = ( ) 0 −2 4 2. Are AB and BA defined? If so, compute them. If not, explain why. Is AB equal to BA? 12. Let ( ) 1 −1 1 A= ( 1 −1 −1 2 ) ( , B= 0 −1 2 1 1 3 ) , and C = 0 −2 3 0 2. 3 20/22 2.2 Product of two matrices Show that A(BC) = (AB)C and (AB) T = B TA T. 13. Two students buy three items in a bookstore. Students 1 and 2 buy 3,2,4 and 6,2,3, respectively. The unit prices and unit taxes are 5, 4, 6 (dollars) and 0.08, 0.07, 0.05, respectively. Use a matrix to show the total prices and taxes paid by each student. 14. Assume that three individuals have contracted a contagious disease and have had direct contact with four people in a second group. The direct contacts can be expressed by a matrix ( ) 0 1 1 1 A= 1 1 1 1. 1 1 0 1 Now, assume that the second group has had a variety of direct contacts with five people in a third group. The direct contacts between groups 2 and 3 are expressed by a matrix ( ) 1 0 0 1 0 0 0 0 1 0 B=. 1 1 0 1 1 1 0 0 1 0 i. Find the total number of indirect contacts between groups 1 and 3. ii. How many indirect contacts are between the second individual in group 1 and the fourth individual in group 3? 15. 15. There are three product items, P1, P2, and P3, for sale from a large company. In the first day, 5, 10, and 100 are sought out. The corresponding unit profits are 500, 400, and 20 (in hundreds of dollars) and the corresponding unit taxes are 3, 2, and 1. Find the total profits and taxes in the first day. 21/22 2.3 Square matrices 2.3 Square matrices An n × n matrix is called a square matrix of order n, that is, (2.3.1) ( ) a 11 a 12 ⋯ a 1n a 21 a 22 ⋯ a 2n A=. ⋮ ⋮ ⋱ ⋮ a n1 a n2 ⋯ a nn The entries a 11, a 22, ⋯, a nn are said to be on the main diagonal of A. The sum of these entries, denoted by tr(A), is called the trace of A, that is, (2.3.2) n tr(A) = ∑ a ii = a 11 + a 22 + ⋯ + a nn. l=1 Example 2.3.1. … 1/11 2.3 Square matrices Let A = ( 15 21 44 25 ). Then A is a square matrix of order 2, the numbers 15, 25 are on the main diagonal of A, and tr(A) = 15 + 25 = 40. Symmetric matrices A square matrix A is said to be symmetric if (2.3.3) A T = A. By (2.3.3) we see that A is symmetric if and only if a ij = a ji for i, j ∈ I n. We can write a symmetric matrix in an explicit form ( ) a 11 a 12 ⋯ a 1n a 12 a 22 ⋯ a 2n A=. ⋮ ⋮ ⋱ ⋮ a 1n a 2n ⋯ a nn From the above matrix, we see that A is symmetric if the ith row and the ith column are the same for each i ∈ I n. Example 2.3.2. … 2/11 2.3 Square matrices 1. The following matrices are symmetric. )( )( ) 1 4 5 1 x2 2 ( 7 −3 −3 0 4 −3 0 5 0 7 x2 2 0 x x 3 2. The following matrices are not symmetric. ( )( ) 1 4 5 2 x2 + 1 2 ( ) 7 −3 2 0 2 −3 0 5 0 7 0 2 1 2 2 2 Definition 2.3.1. A square matrix is said to be i. lower triangular if all the entries above the main diagonal are zero; ii. upper triangular if all the entries below the main diagonal are zero; iii. triangular if it is lower or upper triangular; iv. diagonal if it is lower and upper triangular; v. identity matrix if it is a diagonal matrix whose entries on the main diagonal are 1. We denote by I or I n an n × n identity matrix. Hence, (2.3.4) … 3/11 2.3 Square matrices ( ) 1 0 ⋯ 0 0 1 ⋯ 0 In =. ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 Example 2.3.3. 1. The following matrices are lower triangular. ( ) ( ) ( ) 1 0 0 0 0 0 1 0 0 ( ) 0 0 2 0 2 0 0 0 1 1 0 0 0 0 0 0 1 0 0 x 0 0 2. The following matrices are upper triangular. ( )( )( ) 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 3. The following matrices are diagonal. ( )( )( ) 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 1 0 0 0 4. The following matrices are not triangular matrices. … 4/11 2.3 Square matrices ( )( ) ( 1 1 0 1 0 1 0 2 0 1 1 1 2 0 0 0 0 1 0 0 0 0 0 0 ) 5. The following are identity matrices. ( ) 1 0 0 0 ( ) 1 0 0 I 1 = (1), I 2 = ( ) 1 0 0 1 , I3 = 0 1 0 , I4 = 0 0 1 0 1 0 0 0 0 1 0. 0 0 0 1 The following theorem gives some properties of triangular matrices. The proofs are left to the reader.

Use Quizgecko on...
Browser
Browser