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
4.7 Identity and Inverse Matrices -Identity matrices -Inverse matrix (intro) -An application -Finding inverse matrices (by hand) -Finding inverse matrices (using calculator) A review of the Identity • For real numbers, what is the additive identity? • Zero…. Why? • Because for any real number b, 0 + b = b • What is the multiplicative identity? • 1 … Why? • Because for any real number b, 1 * b = b Identity Matrices • The identity matrix is a square matrix (same # of rows and columns) that, when multiplied by another matrix, equals that same matrix • If A is any n x n matrix and I is the n x n Identity matrix, then A * I = A and I*A = A Examples • The 2 x 2 Identity matrix is: 1 0 0 1 • The 3 x 3 Identity matrix is: 1 0 0 0 1 0 0 0 1 •Notice any pattern? •Most of the elements are 0, except those in the diagonal from upper left to lower right, in which every element is 1! Inverse review • Recall that we defined the inverse of a real number b to be a real number a such that a and b combined to form the identity • For example, 3 and -3 are additive inverses since 3 + -3 = 0, the additive identity • Also, -2 and – ½ are multiplicative inverses since (-2) *(- ½ ) = 1, the multiplicative identity Matrix Inverses • Two n x n matrices are inverses of each other if their product is the identity • Not all matrices have inverses (more on this later) • Often we symbolize the inverse of a matrix by writing it with an exponent of (-1) • For example, the inverse of matrix A is A-1 • A * A-1 = I, the identity matrix.. Also A-1 *A = I • To determine if 2 matrices are inverses, multiply them and see if the result is the Identity matrix! Determine whether X and Y are inverses. Check to see if X • Y = I. Write an equation. Matrix multiplication Now find Y • X. Write an equation. Matrix multiplication Answer: Since X • Y = Y • X = I, X and Y are inverses. Determine whether P and Q are inverses. Check to see if P • Q = I. Write an equation. Matrix multiplication Answer: Since P • Q I, they are not inverses. Determine whether each pair of matrices are inverses. a. Answer: no b. Answer: yes An Application of Inverse Matrices • You can use matrices to encode and decode a message • In other words, matrices are useful for encrypting information • First, translate your message into numbers using the key A = 1, B = 2, etc.. (perhaps 0 = space) • Organize your message into a matrix with 2 columns and as many rows as needed • Multiply the matrix by a 2 x 2 encoding matrix • To decipher the message, multiply the coded message by a 2 x 2 decoding matrix • The decoding matrix will be the inverse of the encoding matrix • Finally, you can translate the numbers back into letters using you’re the key mentioned above Use the table to assign a number to each letter in the message ALWAYS_SMILE. Then code the message with Code the matrix Convert the message to numbers using the table. _ 0 I 9 R 18 A 1 J 10 S 19 B 2 K 11 T 20 C 3 L 12 U 21 D 4 M 13 V 22 E 5 N 14 W23 F 6 O 15 X 24 G 7 P 16 Y 25 H 8 Q 17 Z 26 A L W A Y S _ S M I L E 1 12 23 1 25 19 0 19 13 9 12 5 Write the message in matrix form. Then multiply the message matrix B by the coding matrix A. Write an equation. Matrix multiplication Simplify. Answer: The coded message is 13 | 38 | 24 | 49 | 44 | 107 | 19 | 57 | 22 | 53 | 17 | 39. Now decode the message 13 | 38 | 24 | 49 | 44 | 107 | 19 | 57 | 22 | 53 | 17 | 39 • Decode by: • expressing the coded message as a matrix with 2 columns • Multiplying this matrix by the inverse of A • The inverse of A is shown below: 3 2 1 1 Next, decode the message by multiplying the coded matrix C by A–1. Code Use the table again to convert the numbers to letters. You can now read the message. Answer: _ 0 I 9 R 18 A 1 J 10 S 19 B 2 K 11 T 20 C 3 L 12 U 21 D 4 M 13 V 22 E 5 N 14 W23 F 6 O 15 X 24 G 7 P 16 Y 25 H 8 Q 17 Z 26 1 12 23 1 25 19 0 19 13 9 12 5 A L W A Y S _ S M I L E a. Use the table to assign a number to each letter in the message FUN_MATH. Then code the message Code _ 0 I 9 R 18 A 1 J 10 S 19 B 2 K 11 T 20 C 3 L 12 U 21 D 4 M 13 V 22 E 5 N 14 W23 Answer: 12 | 63 | 28 | 14 | 26 | F 6 O 15 X 24 16 | 40 | 44 G 7 P 16 Y 25 H 8 Q 17 Z 26 with the matrix A = Example 7-3k Code Use the inverse matrix shown below to decode the message!! 1 2 0 1 6 1 3 Answer: _ 0 I 9 R 18 A 1 J 10 S 19 B 2 K 11 T 20 C 3 L 12 U 21 D 4 M 13 V 22 E 5 N 14 W23 F 6 O 15 X 24 6 21 14 0 13 1 20 8 G 7 P 16 Y 25 F U N _ M A T H H 8 Q 17 Z 26 How do we find the inverse??? • 1st you find what is called the determinant • The determinant not only determines whether the inverse of a matrix exists, but also influences what elements the inverse contains • For the matrix shown below, the determinant is equal to ad – bc • In other words, multiply the elements in each diagonal, then subtract the products! a b c d More about determinants • If the determinant of a matrix equals zero, then the inverse of that matrix does not exist! • Every square matrix has a determinant, however 2 x 2 matrices are the only ones we will calculate determinants for by hand • For larger matrices, finding the determinant is considerably more complicated (if you take a linear programming course in college, or AP Physics here at WHS, you may learn how to find 3 x 3 determinants by hand) Finding the inverse of a 2 x 2 matrix • For the matrix: • The inverse is found by calculating: a b c d 1 d b ad bc c a In other words: -Switch the elements a and d -Reverse the signs of the elements b and c -Multiply by the fraction (1 / determinant) Find the inverse of the matrix, if it exists. Find the value of the determinant. Since the determinant is not equal to 0, S –1 exists. Definition of inverse a = –1, b = 0, c = 8, d = –2 Answer: Simplify. Check: Find the inverse of the matrix, if it exists. Find the value of the determinant. Answer: Since the determinant equals 0, T –1 does not exist. Find the inverse of each matrix, if it exists. a. Answer: No inverse exists. b. Answer: Finding inverses for larger matrices • We will not calculate inverses of 3 x 3 or larger matrices by hand • However, we CAN find these using the TI-83 • Enter your matrix using the EDIT menu, then print it on your TI screen using the NAMES menu • Now hit the “X-1” button to indicate that you want to find the inverse of this matrix! • Let’s try some examples on the TI-83!!