1 00:00:05,500 --> 00:00:09,832 We've already seen how to use the inverse of two by two 2 00:00:09,832 --> 00:00:13,081 matrices to solve systems of two simultaneous equations. Inverse 3 00:00:13,081 --> 00:00:15,969 matrices are always useful in solving simultaneous equations, 4 00:00:15,969 --> 00:00:21,384 and so we want to look at in this video is how to find the 5 00:00:21,384 --> 00:00:25,355 inverse of a three by three matrix. This video builds very 6 00:00:25,355 --> 00:00:28,965 much on the previous video which describe finding the determinant 7 00:00:28,965 --> 00:00:32,936 of a three by three matrix, and it's important that you're 8 00:00:32,936 --> 00:00:35,102 familiar with the ideas in that 9 00:00:35,102 --> 00:00:40,251 video. Before you watch this one in particular, you need to know 10 00:00:40,251 --> 00:00:41,544 about cofactors and 11 00:00:41,544 --> 00:00:46,326 determinants. Here's the Matrix a that we saw in the video on 12 00:00:46,326 --> 00:00:49,786 calculating determinants and we saw in that video how every 13 00:00:49,786 --> 00:00:52,208 element in the matrix A has its 14 00:00:52,208 --> 00:00:56,346 own cofactor. And the Co factor is just a value, a 15 00:00:56,346 --> 00:00:59,486 single number, and what I've done here is I've assembled 16 00:00:59,486 --> 00:01:02,626 all those cofactors into a matrix that we've called see. 17 00:01:02,626 --> 00:01:06,080 So for instance, the cofactor of elements 7 is minus two, 18 00:01:06,080 --> 00:01:09,848 and the cofactor Element 4 is 7, and so it goes on. 19 00:01:11,860 --> 00:01:17,208 Now what we want to find the inverse of matrix A. We have to 20 00:01:17,208 --> 00:01:22,938 use this matrix C, but not quite how it is at the moment. What we 21 00:01:22,938 --> 00:01:27,522 have to do is we use it to create something called the 22 00:01:27,522 --> 00:01:32,106 adjoint matrix and we call the adjoint matrix adj adj for a 23 00:01:32,106 --> 00:01:36,690 joint. The adjoint of matrix A. This is true for all matrices, 24 00:01:36,690 --> 00:01:40,510 not just this matrix is the transpose of the cofactor 25 00:01:40,510 --> 00:01:42,420 matrix. So here's the cofactor 26 00:01:42,420 --> 00:01:46,844 matrix. To find the adjoint matrix we have to transpose 27 00:01:46,844 --> 00:01:51,640 this. That means we have to change the rows into columns. 28 00:01:51,640 --> 00:01:56,872 The columns into rows. So the first row minus 239 becomes the 29 00:01:56,872 --> 00:02:01,668 first column minus 239. The 2nd row becomes the second column. 30 00:02:02,250 --> 00:02:08,370 And the third row becomes the third column. 31 00:02:09,050 --> 00:02:16,382 So we found now the adjoint matrix, then the formula for the 32 00:02:16,382 --> 00:02:23,518 inverse matrix. Is the inverse of matrix A? Is one over 33 00:02:23,518 --> 00:02:25,886 the determinant of a? 34 00:02:26,640 --> 00:02:29,920 Times by the adjoint matrix. 35 00:02:31,100 --> 00:02:37,884 I'm writing that using this notation. A inverse 36 00:02:37,884 --> 00:02:44,668 is the value one over determinant of a 37 00:02:44,668 --> 00:02:50,604 times by the adjoint matrix of a. 38 00:02:51,790 --> 00:02:55,350 And that's the key result 39 00:02:55,350 --> 00:03:01,610 in finding. The inverse of any matrix and will use that result 40 00:03:01,610 --> 00:03:04,508 to find the inverse of our 41 00:03:04,508 --> 00:03:09,730 matrix A. Here's our Matrix A and we've worked out the adjoint 42 00:03:09,730 --> 00:03:14,122 matrix. The formula for the inverse is the inverse of A is 43 00:03:14,122 --> 00:03:18,514 one over the determinant value times by the adjoint of a. Now 44 00:03:18,514 --> 00:03:22,906 in the video where we worked out the determinant of this matrix, 45 00:03:22,906 --> 00:03:27,298 we found the determinant of this matrix A is equal to 1. 46 00:03:28,110 --> 00:03:33,830 So in this case, the value 1 divided by the determinant of a 47 00:03:33,830 --> 00:03:40,870 is just 1 / 1 which is 1. So in this case a inverse is 1 48 00:03:40,870 --> 00:03:47,470 times the joint of a or just the adjoint of a. So a inverse turns 49 00:03:47,470 --> 00:03:53,630 out to be just this matrix here minus two 8 -- 5, three minus 50 00:03:53,630 --> 00:03:55,830 11, seven 9 -- 3421. 51 00:03:56,390 --> 00:04:00,669 What you should do is you should check by doing matrix 52 00:04:00,669 --> 00:04:04,170 multiplication that when you multiply original matrix A by 53 00:04:04,170 --> 00:04:08,838 this matrix we've just found here a inverse, so we do a 54 00:04:08,838 --> 00:04:13,117 multiplied by inverse that you do indeed get the three by 55 00:04:13,117 --> 00:04:14,284 three identity matrix. 56 00:04:15,380 --> 00:04:20,803 What I want to go on to do now is to show how we can use this 57 00:04:20,803 --> 00:04:23,036 inverse matrix to solve a set of 58 00:04:23,036 --> 00:04:27,458 simultaneous linear equations. Here we have a set of three 59 00:04:27,458 --> 00:04:32,710 simultaneous equations, 7X plus two Y + Z = 21, three y -- 60 00:04:32,710 --> 00:04:39,982 8 = 5 minus three X + 4 Y minus two, Z = -- 1. We want to 61 00:04:39,982 --> 00:04:44,022 solve these define the values of XY&Z. There are unknowns. 62 00:04:44,810 --> 00:04:49,310 And we've seen how we can do. We can represent these equations 63 00:04:49,310 --> 00:04:53,810 using some key matrices, so we have matrix A, which is the 64 00:04:53,810 --> 00:04:58,310 matrix of coefficients 721 nought. 3 -- 1 -- 3, four and 65 00:04:58,310 --> 00:05:01,598 minus 2. There's the question here is not because we 66 00:05:01,598 --> 00:05:04,108 haven't got any access, so we've got like no XSS. 67 00:05:05,200 --> 00:05:10,192 Then we have a matrix which is just a single column, which is 68 00:05:10,192 --> 00:05:14,800 the unknowns XY&Z and then I have a separate matrix B which 69 00:05:14,800 --> 00:05:19,408 again is just a single column with the values from the right 70 00:05:19,408 --> 00:05:23,632 hand side of the equations. So in matrix form these equations 71 00:05:23,632 --> 00:05:29,008 can be written as this matrix a times this vector X is equal to 72 00:05:29,008 --> 00:05:30,160 this matrix disks. 73 00:05:31,830 --> 00:05:35,520 Then the solution of this equation ax equals B. 74 00:05:36,260 --> 00:05:41,168 We can find by multiplying both sides by the inverse of A 75 00:05:41,168 --> 00:05:46,485 to get that X = a inverse times D. So to find our 76 00:05:46,485 --> 00:05:51,802 solution XY and Z, we need to find a inverse. And of course 77 00:05:51,802 --> 00:05:56,301 we've just done that. We've seen that a inverse is this 78 00:05:56,301 --> 00:05:56,710 matrix. 79 00:05:57,950 --> 00:05:59,210 Minus 2. 80 00:06:00,280 --> 00:06:06,356 8 -- 5 three minus 11 seven. 81 00:06:06,900 --> 00:06:10,232 9 -- 82 00:06:10,232 --> 00:06:15,120 3421. So that's the matrix, a inverse that we've just seen 83 00:06:15,120 --> 00:06:16,396 a few minutes ago. 84 00:06:18,420 --> 00:06:23,308 And so we have to do a inverse times be. So here's be. 85 00:06:23,920 --> 00:06:27,576 20 one 5 -- 86 00:06:27,576 --> 00:06:34,406 1. And so we do the matrix multiplication 2 * 21 is minus 87 00:06:34,406 --> 00:06:41,308 40, two 8 * 5 is 40 -- 5 * -- 1 is +5. 88 00:06:42,040 --> 00:06:43,548 That's our first entry. 89 00:06:44,070 --> 00:06:51,567 I'm going along the 2nd row 3 * 2163 -- 11 * 5 is minus 50 five 90 00:06:51,567 --> 00:06:54,654 7 * -- 1 is minus 7. 91 00:06:55,170 --> 00:07:02,800 And along the last row, 9 * 21 is 189 -- 34 * 5 92 00:07:02,800 --> 00:07:08,795 is minus 170 and 21 * -- 1 is minus 21. 93 00:07:09,320 --> 00:07:16,010 And so if we do the arithmetic, we have 45 -- 42, which is 3. 94 00:07:16,010 --> 00:07:19,578 We have 63 -- 6 D 2 which 95 00:07:19,578 --> 00:07:26,685 is 1. And we have 189 -- 191, which is minus 2. So 96 00:07:26,685 --> 00:07:32,240 the unknowns that we're trying to find the column matrix X. 97 00:07:32,770 --> 00:07:36,838 Which is XY zed? 98 00:07:38,020 --> 00:07:44,785 Is this column matrix three 1 -- 2 so X is equal to 3, Y 99 00:07:44,785 --> 00:07:51,099 is equal to 1 that is equal to minus two. That's our solution X 100 00:07:51,099 --> 00:07:54,256 = 3 Y equals one, zed equals 101 00:07:54,256 --> 00:07:58,867 minus 2. And you can check if you substitute these values 102 00:07:58,867 --> 00:08:01,997 back into any of these equations, you'll see that the 103 00:08:01,997 --> 00:08:05,127 two sides do balance. So for instance, just the second 104 00:08:05,127 --> 00:08:09,196 equation with. Why is worn and said he's minus two, we get 3 105 00:08:09,196 --> 00:08:13,891 * 1 is 3 -- -- 2 three plus two, which is indeed five you 106 00:08:13,891 --> 00:08:17,334 submit those into the two. You'll see that they work as 107 00:08:17,334 --> 00:08:17,647 well. 108 00:08:18,840 --> 00:08:23,350 So inverse matrices are really important when it comes to 109 00:08:23,350 --> 00:08:26,958 solving simultaneous equations. Now you'll notice that our 110 00:08:26,958 --> 00:08:31,919 formula for finding the inverse for three by three matrix had 111 00:08:31,919 --> 00:08:35,978 the value 1 divided by the determinant of a. 112 00:08:36,510 --> 00:08:40,162 Now that means that if the determined today is zero, we 113 00:08:40,162 --> 00:08:43,814 can't actually work that value out because we can't divide by 114 00:08:43,814 --> 00:08:48,388 zero. Now, when the determined to the matrix is zero, we say 115 00:08:48,388 --> 00:08:52,204 the matrix is singular and when a matrix is singular, it doesn't 116 00:08:52,204 --> 00:08:55,066 have an inverse matrix and inverse matrix just doesn't 117 00:08:55,066 --> 00:08:58,564 exist, and so we can't apply the formula. So whenever we're 118 00:08:58,564 --> 00:09:01,744 trying to workout inverse matrices, the thing we should do 119 00:09:01,744 --> 00:09:05,242 first of all is workout the determinant and check that it 120 00:09:05,242 --> 00:09:07,786 isn't going to turn out to be 0.