* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Lecture19.pdf
Survey
Document related concepts
Matrix completion wikipedia , lookup
Linear least squares (mathematics) wikipedia , lookup
Rotation matrix wikipedia , lookup
Jordan normal form wikipedia , lookup
System of linear equations wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Four-vector wikipedia , lookup
Capelli's identity wikipedia , lookup
Singular-value decomposition wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
Perron–Frobenius theorem wikipedia , lookup
Matrix calculus wikipedia , lookup
Orthogonal matrix wikipedia , lookup
Matrix multiplication wikipedia , lookup
Cayley–Hamilton theorem wikipedia , lookup
Transcript
251 Instruction: Introduction to Matrices & Determinants Previous lectures have focused on functions whose inputs and outputs were real numbers. In other words, the previous lectures discussed functions of the form f : X 6 Y where X = Y = \ . This lecture discusses functions whose inputs are square matrices. A matrix is an array of real numbers. Matrix B below is a 3×4 matrix, that is, a matrix with three rows and four columns. The numbers arrayed in a matrix are called entries, denoted aij , the entry in the ith row and jth column. The entry in the second row, third column of matrix B below is thirteen. 4 5 −2⎤ ⎡2 ⎢ B = ⎢1 − 1 13 7 8⎥⎥ ⎢⎣ 6 9 23 10 ⎥⎦ A square matrix has as many rows as columns. Matrix A below is a square 2×2 matrix. ⎡4 A=⎢ ⎣0 − 3⎤ 2 ⎥⎦ Determinants are functions whose inputs are square matrices and whose outputs are real numbers. Let M be the set of square matrices with real number entries. Let Y = \ . A determinant is a function of the form f : M → Y . This lecture will deal exclusively with determinants of 2×2 matrices. a ⎤ a a ⎡a Let A = ⎢ 11 12 ⎥ . The determinant of A, denoted either det ( A ) or 11 12 , is a21 a22 ⎣ a21 a22 ⎦ the function f such that f : A 6 a11 ⋅ a22 − a21 ⋅ a12 . Note that the use of A signifies a determinant, not an absolute value. According to the definition 0⎤ ⎡a b ⎤ ⎡2 and S = ⎢ above, if T = ⎢ ⎥ ⎥ , then det (T ) = ad − bc , and S = −8 . ⎣c d ⎦ ⎣0 − 4 ⎦ 252 Instruction: Determinants of 3 × 3 Matrices If a matrix is a square matrix (the number of rows is equal to the number of columns) as above, then there is a number associated with the matrix called its determinant. Previously, we admitted that determinants are mappings from square matrices with real number entries to real numbers. Placing special emphasis on the output of the function, a determinant is a real number associated with a square matrix and is indicated by enclosing the array between two vertical bars. For a matrix A, the corresponding determinant is designated as det(A) and is read "determinant of A." For example, ⎡1 2 ⎤ matrix A = ⎢ ⎥ ⎣3 4 ⎦ det ( A ) = 1 2 3 4 A determinant may arise from any n × n matrix where n is a positive integer greater than one. This discussion will be 3× 3 determinants. Every square matrix with real entries has a determinant. The method for finding the value of 3× 3 determinants involves finding the value of 2 × 2 determinants. Determinants of larger matrices can be evaluated by using techniques similar to those shown here. The value of a 2 × 2 determinant is the difference between the products of the diagonals as given by the following definition: a b ⎡a b ⎤ For the square matrix A = ⎢ , det(A) = = ad − cb. ⎥ c d ⎣c d ⎦ One method of evaluating 3× 3 determinants is called expanding by minors. In this method, one row (or column) is chosen and each element in that row has a minor. Each minor is found by mentally crossing out both the row and column (shown below with dotted lines) that contain that element. The minors of the elements of the first row are shown here: c11 c12 c13 c 22 c 23 c 21 c 22 c 23 → ← minor of c11 c32 c33 c31 c32 c33 c11 c12 c13 c 21 c 22 c 23 c31 c32 c33 c11 c12 c13 c 21 c 22 c 23 c31 c32 c33 → c 21 c 23 c31 c33 → c 21 c 22 c31 c32 ← minor of c12 ← minor of c13 253 Finding the product of each element and its minor and then adding these products with an adjustment of alternating signs finds the value of a determinant as given by the following definition: c11 c12 c13 ⎡c11 c12 c13 ⎤ ⎢ ⎥ A = ⎢c 21 c 22 c 23 ⎥, det( A) = c 21 c 22 c 23 ⎢⎣c31 c32 c33 ⎥⎦ c31 c32 c33 c 22 c 23 c 21 c 23 c c 22 = c11 ⋅ − c12 ⋅ + c13 ⋅ 21 c32 c33 c31 c33 c31 c32 The value of the determinant may also be found by expanding by the minors of any other row or any column. Each minor is the product of its corresponding element and –1 to the r + c power, (–1)r+c, where r is the row and c is the column of the element. The factor (–1)r+c always produces the following pattern of signs: + − + − + − + − + For instance, the value of a 3× 3 determinant could be found by expanding by the minors of row two according to the chart above: det(A) = –c21(minor of c21) + c22(minor of c22) – c23(minor of c23). Consider matrix C. 1 − 4⎤ ⎡5 ⎢ C = ⎢2 6 3 ⎥⎥ ⎢⎣ 2 2 1 ⎥⎦ The determinant of C is found below by expanding by the minors of row one. det (C ) = 5 6 3 2 3 2 6 −1 + (− 4) 2 1 2 1 2 2 det (C ) = 5(6 ⋅ 1 − 2 ⋅ 3) − 1(2 ⋅ 1 − 2 ⋅ 3) − 4(2 ⋅ 2 − 2 ⋅ 6) det (C ) = 5(6 − 6 ) − 1(2 − 6) − 4(4 − 12 ) det (C ) = 5(0 ) − 1(− 4 ) − 4(− 8) det (C ) = 36 In the next example, the process for finding a 3× 3 determinant is simplified by transforming the matrix with elementary row and column operations first. 254 ⎡6 ⎢− 2 ⎢ ⎢⎣− 3 ⎡0 ⎢− 2 ⎢ ⎢⎣− 3 ⎡6 − 2 4 ⎤ D = ⎢⎢− 2 9 − 1⎥⎥ ⎢⎣− 3 2 − 1⎥⎦ − 2 4⎤ ⎡ 0 25 1 ⎤ ⎥ 9 − 1⎥3 ⋅ R2 + R1 → R1 ⎢⎢− 2 9 − 1⎥⎥ 2 − 1 ⎦⎥ ⎣⎢− 3 2 − 1⎥⎦ 25 1 ⎤ ⎡0 0 1 ⎤ ⎥ 9 − 1⎥ − 25C 3 + C 2 → C 2 ⎢⎢− 2 34 − 1 ⎥⎥ ⎢⎣− 3 27 − 1⎥⎦ 2 − 1⎥⎦ ⎡ 6 − 2 4⎤ ⎢ − 2 9 − 1⎥ ⎥ ⎢ ⎢⎣− 3 2 − 1 ⎥⎦ ↔ row-column equivalent 1⎤ ⎡0 0 ⎢− 2 34 − 1⎥ ⎥ ⎢ ⎢⎣− 3 27 − 1⎥⎦ 6 −2 4 det( D) = − 2 9 − 1 − 3 2 −1 0 0 1 det( D) = − 2 34 − 1 − 3 27 − 1 det( D) = 0 − 2 − 1 − 2 34 34 − 1 −0 +1 − 3 −1 − 3 27 27 − 1 det( D) = 1(− 2 ⋅ 27 − (− 3) ⋅ 34 ) det( D) = −54 + 102 det( D) = 48 Instruction: Some Applications of Determinants It can be shown that the area of a triangle formed by the points (x1,y1), (x2,y2), (x3,y3) is x1 y1 1 1 given by the absolute value of x 2 y 2 1. 2 x3 y 3 1 For example, consider the triangle determined by (0,0), (0,6), (4,0) as shown here. (0,6) (0,0) (4,0) 255 Recall that the area of a triangle equals the product of its base, height, and one-half. Accordingly, the area of the triangle is ½× 4 × 6 = 12. Substituting the coordinates of the four vertices of the triangle into the determinant formula yields the same area: 0 0 1 1 1 1 1 Area = ⋅ ABS 0 6 1 = ⋅ ABS [4(0 − 6)] = ⋅ ABS (− 24 ) = ⋅ 24 = 12. 2 2 2 2 4 0 1 (Note the use of ABS for absolute value. The determinant formula presents some notational difficulties since the symbol for absolute value, two vertical segments, is appropriated to indicate the determinant.) The determinant formula can also be used to show that three points are collinear. x1 y1 1 1 Suppose one calculates the absolute value of x 2 y 2 1 and gets zero. This means the area 2 x3 y 3 1 of the triangle is zero. If the area of a triangle is zero, then the three points must lie in a line. Thus, the determinant formula for the area of a triangle provides a check for collinearity. Three x1 y1 1 1 points, (x1,y1), (x2,y2), (x3,y3), are collinear if and only if the absolute value of x 2 y 2 1 = 0. 2 x3 y 3 1 Determinants present an alternate method for finding the equation of a line through two points. In a Cartesian plane, lines have equations of the form Ax + By + C = 0, and any equation of the form Ax + By + C = 0 is a line. Consider the equation attained from the determinant on the next page. x y 1 x1 y1 1 = 0 x2 x y2 y1 1 y2 1 1 −y x1 1 x2 1 +1 x1 y1 x2 y2 =0 x ( y1 − y2 ) − y ( x1 − x2 ) + ( x1 y2 − x2 y1 ) = 0 For fixed x1, x2, y1, y2 this equation is an equation of the form Ax + By + C = 0, i.e., a line. Furthermore, this line contains the points (x1,y1) and (x2,y2). To check, let x = x1 and y = y2: x1 ( y1 − y 2 ) − y1 ( x1 − x 2 ) + ( x1 y 2 − x 2 y1 ) = 0 x1 y1 − x1 y 2 − x1 y1 + x 2 y1 + x1 y 2 − x 2 y1 = 0 x1 y1 − x1 y1 − x1 y 2 + x1 y 2 + x2 y1 − x 2 y = 0 0=0 256 Thus, determinants present an alternate method for finding the equation of a line through two given points. For example, to find the equation of the line that passes through (1,5) and (3,2), x y 1 substitute into the equation x1 y1 1 = 0 as shown below. x2 y2 1 x y 1 1 5 1 =0 3 2 1 x 5 1 1 1 1 5 −y +1 =0 2 1 3 1 3 2 x ( 5 − 2 ) − y (1 − 3) + ( 2 − 15 ) = 0 x ( 3) − y ( −2 ) + ( −13) = 0 3x + 2 y − 13 = 0 It is not important to expand using the first row. Any row or column will work. 257 Instruction: Determinants Example 1 Finding the Determinant of a 2×2 Matrix 1⎤ ⎡ −5 − ⎥ ⎢ Given B = 2 , find det ( B ) . ⎢ ⎥ 3⎦ ⎣ 6 det( B) = 1 2 3 −5 − 6 ⎛ 1⎞ det( B ) = −5(3) − 6⎜ − ⎟ ⎝ 2⎠ det( B) = −15 + 3 det( B) = −12. Example 2 Finding the Missing Entries of a 2×2 Matrix Given the Determinant ⎡ x − 3⎤ Suppose A = ⎢ ⎥ and det ( A ) = 8 . What are the possible values of x ? ⎣4 8 ⎦ det( A) = x −3 4 8 8 = x ⋅ 8 − 4 ( −3) 8 = 8 x + 12 −4 = 8 x 4 − =x 8 1 − =x 2 258 Instruction: Determinants Example 1 Finding the Determinant of a 3×3 Matrix ⎡6 Given C = ⎢⎢ 2 ⎢⎣ 2 2 1 3 − 1⎤ 0 ⎥⎥ , find det ( C ) . 9 ⎥⎦ Since row two has a zero and two positive elements, expanding by the minors of row two is convenient. Recall the sign pattern for row two (–,+,–). det ( C ) = −2 2 −1 6 −1 6 2 +1 −0 3 9 2 9 2 3 Calculate the determinant of each minor and simplify. det ( C ) = −2 ( 2 ⋅ 9 − 3 ⋅ −1) + 1( 6 ⋅ 9 − 2 ⋅ −1) − 0 ( 6 ⋅ 3 − 2 ⋅ 2 ) det ( C ) = −2 (18 + 3) + 1( 54 + 2 ) − 0 (18 − 4 ) det ( C ) = −2 ( 21) + 1( 56 ) − 0 (14 ) det ( C ) = −42 + 56 − 0 det ( C ) = 14 259 Example 2 Using the Determinant of a 3×3 Matrix to Calculate Area of a Triangle Suppose a triangle has vertices at ( 0, 0 ) , ( 6, −2 ) , and (1, −8 ) . Find the area of the triangle using determinants. ⎛ 0 0 1⎞ 1 ⎜ ⎟ Area = ABS ⎜ 6 − 2 1 ⎟ 2 ⎜ 1 −8 1 ⎟ ⎝ ⎠ ⎛ −2 1 6 1 6 −2 ⎞ 1 Area = ABS ⎜ 0 ⋅ − 0⋅ +1 ⎟ 1 1 1 −8 ⎠ 2 ⎝ −8 1 1 Area = ABS 0 − 0 + 1( 6 ⋅ ( −8 ) − 1 ⋅ ( −2 ) ) 2 1 Area = ABS ( −48 + 2 ) 2 1 Area = ABS ( −46 ) 2 1 Area = ⋅ 46 2 Area = 23 square units ( ) 260 Example 3 Using the Determinant of a 3×3 Matrix to Find the Equation of a Line Suppose a line contains the points ( −1, 0 ) and ( 6, 2 ) . Find the equation describing the line using determinants. x y 1 −1 0 1 = 0 6 2 1 x⋅ 0 1 −1 1 −1 0 − y⋅ + 1⋅ =0 2 1 6 1 6 2 x ⋅ ( 0 ⋅1 − 2 ⋅1) − y ⋅ ( −1 ⋅1 − 6 ⋅1) + 1 ⋅ ( −1 ⋅ 2 − 6 ⋅ 0 ) = 0 ( 0 − 2 ) x − ( −1 − 6 ) y + ( −2 − 0 ) = 0 −2 x − ( −7 ) y + ( −2 ) = 0 −2 x + 7 y − 2 = 0 y= 2 2 x+ 7 7 261 Problems #1 ⎡5 Given M = ⎢ ⎣ −9 #2 Evaluate #3 ⎡x Let N be a 2 × 2 matrix. Use the function det ( N ) to map ⎢ ⎣3 #4 ⎡10 x If V = ⎢ ⎢ −2 ⎣ #1 det ( M ) = 33 #4 x = 22 2⎤ , evaluate det ( M ) . 3 ⎥⎦ 45 − 2 . 19 − 1 1⎤ . 2 ⎥⎦ x⎤ 1 ⎥⎥ , find the values of x such that det (V ) = 154 . 2⎦ #2 45 − 2 = −7 19 − 1 ⎡x #3 ⎢ ⎣3 1⎤ 6 2x − 3 2 ⎥⎦ 262 Problems #1 2 4 Evaluate − 1 3 5 −2 6 3 . 2 #2 Show with any example that the determinant of a matrix is zero if every element in a row or column of that matrix is zero. #3 Use determinants to find the area of a triangle formed by (–4, –3), (0,5), (7,1). #4 Use determinants to find the equation of a line passing through (0,6) and (–3, –8). 1 2 #5 3 What is the value of x if 4 0 − 1 = 6 ? x 1 −2 ANSWERS #1 14 0 0 0 1 3 7 3 7 1 − 0⋅ + 0⋅ =0 1 3 = 0⋅ 2 5 4 5 4 2 4 2 5 #2 Consider 7 #3 Area equals 36 square units. #4 14x – 3y + 18 = 0 #5 x = 11.5 263 Suggested Homework from Blitzer Section 6.5: #1-7 odd, #27-31 odd, #51-57 odd Application Exercise Surveyors map the counter-clockwise vertices ( x1 , y1 ) , ( x2 , y2 ) ,… , ( xn , yn ) of a polygonal plot of land to the plot's square area using the function below. A : ( x1 , y1 ) , ( x2 , y2 ) ,… , ( xn , yn ) 1 ⎧⎪ x1 x2 x2 x3 + + ⎨ 2 ⎩⎪ y 1 y2 y2 y3 + xn x1 ⎫⎪ ⎬ y n y1 ⎭⎪ Find the area for a plot of land with vertices ( 9 ft , −2 ft ) , ( 24 ft , 4 ft ) , (18 ft ,12 ft ) , and (1 ft , 2 ft ) .