Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
“No one can be told what the matrix is… they have to see it for themselves…” - Lawrence Fishburne It’s a good thing we have Section 7.2a!!! Definition: Matrix Let m and n be positive integers. An m x n matrix (read “m by n matrix”) is a rectangular array of m rows and n columns of real numbers. a11 a 21 am1 a12 a22 am 2 a1n a2 n amn We also use the shorthand notation [a ij ] for this matrix. Definition: Matrix Each element, or entry, aij , of the matrix uses double subscript notation. The row subscript is the first subscript i, and the column subscript is j. The element aij is in the i-th row and j-th column. In general the order of an m x n matrix is m x n. If m = n, the matrix is a square matrix. Two matrices are equal matrices if they have the same order and their corresponding elements are equal. Practice Problem!!! Determine the order of the matrix, and identify the specified elements. 1 2 3 2 0 4 Order 2 x 3 a12 a21 = –2 =2 Practice Problem!!! Determine the order of the matrix, and identify the specified elements. 1 1 0 4 2 1 3 2 Order 4 x 2 a22 =4 a43 Doesn’t exist! Matrix Addition and Subtraction We can add or subtract matrices of the same order by adding or subtracting their corresponding entries. Matrices of different orders cannot be added or subtracted!!! Let A aij and B bij be matrices of order m x n. 1. The sum A + B is the m x n matrix A B aij bij 2. The difference A – B is the m x n matrix A B aij bij Scalar Multiplication of Matrices When dealing with matrices, real numbers are scalars. The product of the real number k and the m x n matrix A aij is the m x n matrix kA kaij The matrix kA kaij is a scalar multiple of A. A Few More Definitions… Let A = [a ij ] be any m x n matrix. The m x n matrix O = [0] consisting entirely of zeros is the zero matrix because A + O = A. In other words, O is the additive identity for the set of all m x n matrices. The m x n matrix B = [–a ij ] consisting of the additive inverses of the entries of A is the additive inverse of A because A + B = O. Practice Problem!!! For the given matrices, find (a) A + B, (b) A – B, (c) 3A, and (d) 2A – 3B. 1 0 2 A 4 1 1 2 0 1 1 1 2 A B 3 1 1 6 3 0 2 1 0 B 1 0 2 4 3 1 3 1 2 A B 5 1 3 2 3 2 Practice Problem!!! For the given matrices, find (a) A + B, (b) A – B, (c) 3A, and (d) 2A – 3B. 1 0 2 A 4 1 1 2 0 1 2 1 0 B 1 0 2 4 3 1 3 0 6 8 3 4 3A 12 3 3 2A 3B 11 2 8 6 0 3 8 9 5 Practice Problem!!! Let A = [a ij ] and B = [b ij ] be 2 x 2 matrices with aij = 3i – j and b ij = i 2 + j 2 – 3 for i = 1, 2, and j = 1, 2. 1. Determine A and B. 2 1 1 2 A B 5 4 2 5 Practice Problem!!! Let A = [a ij ] and B = [b ij ] be 2 x 2 matrices with aij = 3i – j and b ij = i 2 + j 2 – 3 for i = 1, 2, and j = 1, 2. 2. Determine the additive inverse –A of A and verify that A + (–A) = [0]. What is the order of [0]? 2 1 2 1 A A 5 4 5 4 0 0 A A 0 0 0 The order of [0] is 2 x 2. Practice Problem!!! Let A = [a ij ] and B = [b ij ] be 2 x 2 matrices with aij = 3i – j and b ij = i 2 + j 2 – 3 for i = 1, 2, and j = 1, 2. 3. Determine 3A – 2B. 8 1 3A 2B 11 2 Matrix Multiplication Definition: Matrix Multiplication Let A = [a ij ] be an m x r matrix and B = [b ij ] an r x n matrix. The product AB = [c ij ] is the m x n matrix where cij ai1b1 j ai 2b2 j air brj To multiply two matrices, the columns of the first matrix must equal the rows of the second matrix. The resulting matrix has rows and columns determined by the “outside” values. Ex: Can we multiply a 3 x 2 matrix and a 2 x 4 matrix??? (3 x 2)(2 x 4) Yes, we can multiply… and the result is a 3 x 4 matrix… Find the product AB, where possible: 2 1 3 A 0 1 2 2 1 1 0 31 AB 0 1 1 0 2 1 1 4 B 0 2 1 0 2 4 1 2 3 0 0 4 1 2 2 0 1 6 AB 2 2 Support with a calculator??? Find the product AB, where possible: 3 4 2 1 3 B A 2 1 0 1 2 The product AB is not defined!!! Why?? A florist makes three different cut flower arrangements (I, II, and III). Matrix A shows the number of each type of flower used in each arrangement. I II III Roses 5 8 7 A = Carnations 6 6 7 Lilies 4 3 3 The florist can buy his flowers from two different wholesalers (W1 and W2), but wants to give all his business to one or the other. The cost of the three flower types from the two wholesalers is shown in matrix B. W1 W2 Roses 1.50 1.35 B = Carnations 0.95 1.00 Lilies 1.30 1.35 I II Roses 5 A = Carnations 6 III Roses 8 7 B = Carnations 6 7 Lilies 4 3 3 Lilies W1 W2 1.50 1.35 0.95 1.00 1.30 1.35 Construct a matrix showing the cost of making each of the three flower arrangements from flowers supplied by the two different wholesalers. We want the columns of A to match up with the rows of B, so we first switch the rows and columns of A: Rose Carn Lily I 5 6 4 II 8 6 3 III 7 7 3 The new matrix is called the transpose of A, and is denoted AT I II III W1 Roses 5 A = Carnations 6 Roses 8 7 B = Carnations 6 7 Lilies 4 3 3 Lilies W2 1.50 1.35 0.95 1.00 1.30 1.35 Construct a matrix showing the cost of making each of the three flower arrangements from flowers supplied by the two different wholesalers. Now, we find the product AT B: Rose Carn Lily I 5 6 4 W1 W2 W1 W2 I 18.40 18.15 1.35 II 8 6 3 x Carn 0.95 1.00 = II 21.60 20.85 III 7 7 3 III 21.05 20.50 Lily 1.30 1.35 Rose 1.50