1 00:00:00,000 --> 00:00:00,620 2 00:00:00,620 --> 00:00:03,800 Perhaps even more interesting than finding the inverse of a 3 00:00:03,799 --> 00:00:07,209 matrix is trying to determine when an inverse of a matrix 4 00:00:07,209 --> 00:00:09,949 doesn't exist. Or when it's undefined. 5 00:00:09,949 --> 00:00:14,864 And a square matrix for which there is no inverse, of which 6 00:00:14,865 --> 00:00:17,339 an inverse is undefined is called a singular matrix. 7 00:00:17,339 --> 00:00:19,969 So let's think about what a singular matrix will look 8 00:00:19,969 --> 00:00:23,439 like, and how that applies to the different problems that 9 00:00:23,440 --> 00:00:25,140 we've address using matrices. 10 00:00:25,140 --> 00:00:27,410 So if I had the other 2 by 2, because that's 11 00:00:27,410 --> 00:00:28,420 just a simpler example. 12 00:00:28,420 --> 00:00:31,470 But it carries over into really any size square matrix. 13 00:00:31,469 --> 00:00:33,530 So let's take our 2 by 2 matrix. 14 00:00:33,530 --> 00:00:38,320 And the elements are a, b, c and d. 15 00:00:38,320 --> 00:00:41,219 What's the inverse of that matrix? 16 00:00:41,219 --> 00:00:43,509 This hopefully is a bit of second nature to you now. 17 00:00:43,509 --> 00:00:51,765 It's 1 over the determinant of a, times the adjoint of a. 18 00:00:51,765 --> 00:00:53,780 And in this case, you just switch these two terms. So you 19 00:00:53,780 --> 00:00:55,200 have a d and an a. 20 00:00:55,200 --> 00:00:56,480 And you make these two terms negative. 21 00:00:56,479 --> 00:01:00,709 So you have minus c and minus b. 22 00:01:00,710 --> 00:01:04,420 So my question to you is, what will make this entire 23 00:01:04,420 --> 00:01:06,409 expression undefined? 24 00:01:06,409 --> 00:01:09,259 Well it doesn't matter what numbers I have. If I have 25 00:01:09,260 --> 00:01:11,740 numbers here that make a defined, then I can obviously 26 00:01:11,739 --> 00:01:13,469 swap them or make them negative, and it won't change 27 00:01:13,469 --> 00:01:15,030 this part of the expression. 28 00:01:15,030 --> 00:01:20,129 But what would create a problem is if we attempted to 29 00:01:20,129 --> 00:01:21,409 divide by 0 here. 30 00:01:21,409 --> 00:01:26,099 If the determinant of the matrix A were undefined. 31 00:01:26,099 --> 00:01:40,560 So A inverse is undefined, if and only if-- and in math they 32 00:01:40,560 --> 00:01:46,769 sometimes write it if with two f's-- if and only if the 33 00:01:46,769 --> 00:01:49,459 determinant of A is equal to 0. 34 00:01:49,459 --> 00:01:51,909 So the other way to view that is, if a determinant of any 35 00:01:51,909 --> 00:01:54,719 matrix is equal to 0, then that matrix is a singular 36 00:01:54,719 --> 00:01:59,480 matrix, and it has no inverse, or the inverse is undefined. 37 00:01:59,480 --> 00:02:02,950 So let's think about in conceptual terms, at least the 38 00:02:02,950 --> 00:02:06,200 two problems that we've looked at, what a 0 determinant 39 00:02:06,200 --> 00:02:08,500 means, and see if we can get a little bit of intuition for 40 00:02:08,500 --> 00:02:11,580 why there is no inverse. 41 00:02:11,580 --> 00:02:12,830 So what is a 0 determinant? 42 00:02:12,830 --> 00:02:14,850 In this case, what's a determinant of this 2 by 2? 43 00:02:14,849 --> 00:02:18,169 Well the determinant of A is equal to what? 44 00:02:18,169 --> 00:02:20,899 It's equal to ad minus bc. 45 00:02:20,900 --> 00:02:25,560 46 00:02:25,560 --> 00:02:30,360 So this matrix is singular, or it has no inverse, if this 47 00:02:30,360 --> 00:02:31,680 expression is equal to 0. 48 00:02:31,680 --> 00:02:32,990 So let me write that over here. 49 00:02:32,990 --> 00:02:40,379 So if ad is equal to bc-- or we can just manipulate things, 50 00:02:40,379 --> 00:02:47,349 and we could say if a/b is equal to c/d-- I just divided 51 00:02:47,349 --> 00:02:50,229 both sides by b, and divided both sides by d-- so if the 52 00:02:50,229 --> 00:02:55,199 ratio of a:b is the same as the ratio of c:d, then this 53 00:02:55,199 --> 00:02:57,009 will have no inverse. 54 00:02:57,009 --> 00:03:01,229 Or another way we could write this expression, if a/c-- if I 55 00:03:01,229 --> 00:03:07,310 divide both sides by c, and divide both sides by d-- is 56 00:03:07,310 --> 00:03:10,599 equal to b/d. 57 00:03:10,599 --> 00:03:14,359 So another way that this would be singular is if-- and it's 58 00:03:14,360 --> 00:03:15,290 actually the same way. 59 00:03:15,289 --> 00:03:16,569 If this is true, then this is true. 60 00:03:16,569 --> 00:03:17,629 These are the same. 61 00:03:17,629 --> 00:03:20,150 Just a little bit of algebraic manipulation. 62 00:03:20,150 --> 00:03:23,689 But if the ratio of a:c is equal to the ratio of b:d, and 63 00:03:23,689 --> 00:03:25,270 you can think about why that's the same thing. 64 00:03:25,270 --> 00:03:26,900 The ratio of a:b being the same thing as 65 00:03:26,900 --> 00:03:27,610 the ratio of c:d. 66 00:03:27,610 --> 00:03:29,200 But anyway, I don't want to confuse you. 67 00:03:29,199 --> 00:03:33,179 But let's think about how that translates into some of the 68 00:03:33,180 --> 00:03:35,349 problems that we looked at. 69 00:03:35,349 --> 00:03:40,900 So let's say that we wanted to look at the problem-- Let's 70 00:03:40,900 --> 00:03:45,110 say that we had this matrix representing the linear 71 00:03:45,110 --> 00:03:45,920 equation problem. 72 00:03:45,919 --> 00:03:47,000 Well, actually, this would be either one. 73 00:03:47,000 --> 00:04:01,289 So I have a, b, c, d times x, y Is equal to two other 74 00:04:01,289 --> 00:04:06,530 numbers that we haven't used yet, e and f. 75 00:04:06,530 --> 00:04:09,849 So if we have this matrix equation representing the 76 00:04:09,849 --> 00:04:11,829 linear equation problem, then the linear equation problem 77 00:04:11,830 --> 00:04:23,360 would be translated a times x plus b times y is equal to e. 78 00:04:23,360 --> 00:04:31,290 And c times x plus d times y is equal to f. 79 00:04:31,290 --> 00:04:33,689 And we would want to see where these two intersect. 80 00:04:33,689 --> 00:04:34,949 That would be the solution, the vector 81 00:04:34,949 --> 00:04:37,149 solution to this equation. 82 00:04:37,149 --> 00:04:40,849 And so, just to get a visual understanding of what these 83 00:04:40,850 --> 00:04:43,850 two lines look like, let's put it into the 84 00:04:43,850 --> 00:04:45,200 slope y-intercept form. 85 00:04:45,199 --> 00:04:47,930 So this would become what? 86 00:04:47,930 --> 00:04:52,189 In this case, y is equal to what? 87 00:04:52,189 --> 00:05:04,610 y is equal to minus a/b, x plus e/b. 88 00:05:04,610 --> 00:05:05,620 I'm just skipping some steps. 89 00:05:05,620 --> 00:05:08,629 But you subtract ax from both sides. 90 00:05:08,629 --> 00:05:11,579 And then divide both sides by b, and you get that. 91 00:05:11,579 --> 00:05:14,365 And then this equation, if you put it in the same form, just 92 00:05:14,365 --> 00:05:15,689 solve for y. 93 00:05:15,689 --> 00:05:35,930 You get y is equal to minus c/d x plus f/y. 94 00:05:35,930 --> 00:05:40,120 So let's think about this. 95 00:05:40,120 --> 00:05:42,720 I should probably change colors because it looks too-- 96 00:05:42,720 --> 00:05:46,910 Let's think about what these two equations would look like 97 00:05:46,910 --> 00:05:48,160 if this holds. 98 00:05:48,160 --> 00:05:50,730 99 00:05:50,730 --> 00:05:53,580 And we said if this holds, then we have no determinant, 100 00:05:53,579 --> 00:05:57,259 and this becomes a singular matrix, and it has no inverse. 101 00:05:57,259 --> 00:05:59,990 And since it has no inverse, you can't solve this equation 102 00:05:59,990 --> 00:06:02,110 by multiplying both sides by the inverse, because the 103 00:06:02,110 --> 00:06:03,430 inverse doesn't exist. 104 00:06:03,430 --> 00:06:04,560 So let's think about this. 105 00:06:04,560 --> 00:06:07,410 If this is true, we have no determinant, but what does 106 00:06:07,410 --> 00:06:11,200 that mean intuitively in terms of these equations? 107 00:06:11,199 --> 00:06:18,539 Well if a/b is equal to c/d, these two lines will have the 108 00:06:18,540 --> 00:06:20,379 same slope. 109 00:06:20,379 --> 00:06:21,670 They'll have the same slope. 110 00:06:21,670 --> 00:06:24,150 So if these two expressions are different, then what do we 111 00:06:24,149 --> 00:06:25,399 know about them? 112 00:06:25,399 --> 00:06:27,379 If two lines that have the same slope and different 113 00:06:27,379 --> 00:06:30,449 y-intercepts, they're parallel to each other, and they will 114 00:06:30,449 --> 00:06:32,170 never, ever intersect. 115 00:06:32,170 --> 00:06:46,000 So let me draw that, just so you get the-- this top line-- 116 00:06:46,000 --> 00:06:47,689 They don't have to be positive numbers, but since this has a 117 00:06:47,689 --> 00:06:51,129 negative, I'll draw it as a negative slope. 118 00:06:51,129 --> 00:06:54,740 So that's the first line. 119 00:06:54,740 --> 00:07:00,310 And its y-intercept will be e/b. 120 00:07:00,310 --> 00:07:02,829 121 00:07:02,829 --> 00:07:05,959 That's this line right here. 122 00:07:05,959 --> 00:07:10,969 And then the second line-- let me do it in another color-- I 123 00:07:10,970 --> 00:07:12,800 don't know if it's going to be above or below that line, but 124 00:07:12,800 --> 00:07:14,610 it's going to be parallel. 125 00:07:14,610 --> 00:07:15,910 It'll look something like this. 126 00:07:15,910 --> 00:07:19,750 127 00:07:19,750 --> 00:07:23,519 And that line's y-intercept-- so that's this line-- that 128 00:07:23,519 --> 00:07:28,569 line's y intercept is going to be f/y. 129 00:07:28,569 --> 00:07:32,370 So if e/b and f/y are different terms, but both 130 00:07:32,370 --> 00:07:34,290 lines have the same equation, they're going to be parallel 131 00:07:34,290 --> 00:07:36,280 and they'll never intersect. 132 00:07:36,279 --> 00:07:37,779 So there actually would be no solution. 133 00:07:37,779 --> 00:07:40,799 If someone told you-- just the traditional way that you've 134 00:07:40,800 --> 00:07:43,730 done it, either through substitution, or through 135 00:07:43,730 --> 00:07:45,920 adding or subtracting the linear equations-- you 136 00:07:45,920 --> 00:07:47,449 wouldn't be able to find a solution where these two 137 00:07:47,449 --> 00:07:50,469 intersect, if a/b is equal to c/d. 138 00:07:50,470 --> 00:07:53,040 So one way to view the singular matrix is that you 139 00:07:53,040 --> 00:07:54,140 have parallel lines. 140 00:07:54,139 --> 00:07:56,610 Well then you might say, hey Sal, but these two lines would 141 00:07:56,610 --> 00:07:59,490 intersect if e/b equaled f/y. 142 00:07:59,490 --> 00:08:01,800 If this and this were the same, then these would 143 00:08:01,800 --> 00:08:03,509 actually be the identical lines. 144 00:08:03,509 --> 00:08:05,730 And not only would they intersect, they would 145 00:08:05,730 --> 00:08:08,060 intersect in an infinite number of places. 146 00:08:08,060 --> 00:08:10,550 But still you would have no unique solution. 147 00:08:10,550 --> 00:08:14,259 You'd have no one solution to this equation. 148 00:08:14,259 --> 00:08:17,319 It would be true at all values of x and y. 149 00:08:17,319 --> 00:08:20,290 So you can kind of view it when you apply the matrices to 150 00:08:20,290 --> 00:08:21,970 this problem. 151 00:08:21,970 --> 00:08:24,780 The matrix is singular, if the two lines that are being 152 00:08:24,779 --> 00:08:29,959 represented are either parallel, or they are the 153 00:08:29,959 --> 00:08:31,229 exact same line. 154 00:08:31,230 --> 00:08:33,558 They're parallel and not intersecting at all. 155 00:08:33,558 --> 00:08:36,449 Or they are the exact same line, and they intersect at an 156 00:08:36,450 --> 00:08:40,879 infinite number of points. 157 00:08:40,879 --> 00:08:42,158 And so it kind of makes sense that the A 158 00:08:42,158 --> 00:08:44,038 inverse wasn't defined. 159 00:08:44,038 --> 00:08:47,610 So let's think about this in the context of the linear 160 00:08:47,610 --> 00:08:50,070 combinations of vectors. 161 00:08:50,070 --> 00:08:51,970 That's not what I wanted to use to erase it. 162 00:08:51,970 --> 00:08:59,250 163 00:08:59,250 --> 00:09:01,970 So when we think of this problem in terms of linear 164 00:09:01,970 --> 00:09:06,220 combination of factors, we can think of it like this. 165 00:09:06,220 --> 00:09:15,009 That this is the same thing as the vector ac times x plus the 166 00:09:15,009 --> 00:09:25,500 vector bd times y, is equal to the vector ef. 167 00:09:25,500 --> 00:09:27,179 So let's think about it a little bit. 168 00:09:27,179 --> 00:09:30,109 We're saying, is there some combination of the vector ac 169 00:09:30,110 --> 00:09:34,509 and the vector bd that equals the vector ef. 170 00:09:34,509 --> 00:09:39,439 But we just said that if we have no inverse here, we know 171 00:09:39,440 --> 00:09:41,890 that because the determinant is 0. 172 00:09:41,889 --> 00:09:45,399 And if the determinant is 0, then we know in this situation 173 00:09:45,399 --> 00:09:50,579 that a/c must equal b/d. 174 00:09:50,580 --> 00:09:53,120 So a/c is equal to b/d. 175 00:09:53,120 --> 00:09:56,049 So what does that tell us? 176 00:09:56,049 --> 00:09:58,729 Well let me draw it. 177 00:09:58,730 --> 00:10:00,710 And maybe numbers would be more helpful here. 178 00:10:00,710 --> 00:10:02,950 But I think you'll get the intuition. 179 00:10:02,950 --> 00:10:05,390 I'll just draw the first quadrant. 180 00:10:05,389 --> 00:10:09,282 I'll just assume both sectors are in the first quadrant. 181 00:10:09,282 --> 00:10:10,835 Let me draw. 182 00:10:10,835 --> 00:10:17,990 183 00:10:17,990 --> 00:10:19,590 The vector ac. 184 00:10:19,590 --> 00:10:20,754 Let's say that this is a. 185 00:10:20,754 --> 00:10:23,072 Let me do it in a different color. 186 00:10:23,072 --> 00:10:24,860 So I'm gonna draw the vector ac. 187 00:10:24,860 --> 00:10:31,539 So if this is a, and this is c, then the vector 188 00:10:31,539 --> 00:10:33,870 ac looks like that. 189 00:10:33,870 --> 00:10:34,259 Let me draw it. 190 00:10:34,259 --> 00:10:36,210 I want to make this neat. 191 00:10:36,210 --> 00:10:40,440 The vector ac is like that. 192 00:10:40,440 --> 00:10:43,120 And then we have the arrow. 193 00:10:43,120 --> 00:10:44,950 And what would the vector bd look like? 194 00:10:44,950 --> 00:10:49,700 195 00:10:49,700 --> 00:10:54,310 Well the vector bd-- And I could draw 196 00:10:54,309 --> 00:10:55,209 it arbitrarily someplace. 197 00:10:55,210 --> 00:10:58,580 But we're assuming that there's no derivative-- sorry, 198 00:10:58,580 --> 00:10:59,660 no determinant. 199 00:10:59,659 --> 00:11:01,329 Have I been saying derivative the whole time? 200 00:11:01,330 --> 00:11:02,090 I hope not. 201 00:11:02,090 --> 00:11:03,379 Well, we're assuming that there's no 202 00:11:03,379 --> 00:11:06,070 determinant to this matrix. 203 00:11:06,070 --> 00:11:08,010 So if there's no determinant, we know that 204 00:11:08,009 --> 00:11:11,509 a/c is equal to b/d. 205 00:11:11,509 --> 00:11:16,120 Or another way to view it is that c/d is equal to d/b. 206 00:11:16,120 --> 00:11:17,929 But what that tells you is that both of these vectors 207 00:11:17,929 --> 00:11:19,349 kind of have the same slope. 208 00:11:19,350 --> 00:11:22,580 So if they both start at point 0, they're going to go in the 209 00:11:22,580 --> 00:11:23,139 same direction. 210 00:11:23,139 --> 00:11:25,500 They might have a different magnitude, but they're going 211 00:11:25,500 --> 00:11:27,080 to go in the same direction. 212 00:11:27,080 --> 00:11:37,009 So if this is point b, and this is point d, vector bd is 213 00:11:37,009 --> 00:11:39,539 going to be here. 214 00:11:39,539 --> 00:11:42,049 And if that's not obvious to you, think a little bit about 215 00:11:42,049 --> 00:11:46,079 why these two vectors, if this is true, are going to point in 216 00:11:46,080 --> 00:11:48,200 the same direction. 217 00:11:48,200 --> 00:11:52,020 So that vector is going to essentially overlap. 218 00:11:52,019 --> 00:11:56,039 It's going to have the same direction as this vector, but 219 00:11:56,039 --> 00:11:59,259 it's just going to have a different magnitude. 220 00:11:59,259 --> 00:12:00,730 It might have the same magnitude. 221 00:12:00,730 --> 00:12:04,480 So my question to you is, vector ef, we don't know where 222 00:12:04,480 --> 00:12:05,600 vector ef is. 223 00:12:05,600 --> 00:12:08,190 Well let's pick some arbitrary point. 224 00:12:08,190 --> 00:12:12,080 Let's say that this is e, and this is f. 225 00:12:12,080 --> 00:12:13,700 So this is vector ef up there. 226 00:12:13,700 --> 00:12:17,129 Let me do it in a different color. 227 00:12:17,129 --> 00:12:19,250 Vector ef, let's say it's there. 228 00:12:19,250 --> 00:12:23,419 229 00:12:23,419 --> 00:12:26,509 So my question to you is, if these two vectors are in the 230 00:12:26,509 --> 00:12:27,309 same direction. 231 00:12:27,309 --> 00:12:28,849 Maybe of different magnitude. 232 00:12:28,850 --> 00:12:32,620 Is there any way that you can add or subtract combinations 233 00:12:32,620 --> 00:12:35,139 of these two vectors to get to this vector? 234 00:12:35,139 --> 00:12:37,419 Well no, you can scale these vectors and add them. 235 00:12:37,419 --> 00:12:39,649 And all you're going to do is kind of move along this line. 236 00:12:39,649 --> 00:12:41,610 You can get to any other vector. 237 00:12:41,610 --> 00:12:43,800 There's a multiple of one of these vectors. 238 00:12:43,799 --> 00:12:46,990 But because these are the exact same direction, you 239 00:12:46,990 --> 00:12:49,560 can't get to any vector that's in a different direction. 240 00:12:49,559 --> 00:12:53,049 So if this vector is in a different direction, there's 241 00:12:53,049 --> 00:12:54,259 no solution here. 242 00:12:54,259 --> 00:13:00,529 If this vector just happened to be in the same direction as 243 00:13:00,529 --> 00:13:03,980 this, then there would be a solution, where you could just 244 00:13:03,980 --> 00:13:04,789 scale those. 245 00:13:04,789 --> 00:13:08,099 Actually, there would be an infinite number of solutions 246 00:13:08,100 --> 00:13:09,500 in terms of x and y. 247 00:13:09,500 --> 00:13:13,580 But if the vector is slightly different, in terms of its 248 00:13:13,580 --> 00:13:15,320 direction, then there is no solution. 249 00:13:15,320 --> 00:13:18,310 There is no combination of this vector and this vector 250 00:13:18,309 --> 00:13:19,979 that can add you up to this one. 251 00:13:19,980 --> 00:13:22,384 And it's something for you think about a little bit. 252 00:13:22,384 --> 00:13:23,360 It might be obvious to you. 253 00:13:23,360 --> 00:13:24,730 But another way to think about it is, when you're trying to 254 00:13:24,730 --> 00:13:29,000 take sums of vectors, any other vector, in order to move 255 00:13:29,000 --> 00:13:31,149 it in that direction, you have to have a little bit of one 256 00:13:31,149 --> 00:13:33,470 direction and a little bit of another direction, to get to 257 00:13:33,470 --> 00:13:34,230 any other vector. 258 00:13:34,230 --> 00:13:36,519 And if both of your ingredient vectors are the same 259 00:13:36,519 --> 00:13:39,240 direction, there's no way to get to a different one. 260 00:13:39,240 --> 00:13:42,450 Anyway, I'm probably just being circular in what I'm 261 00:13:42,450 --> 00:13:43,240 explaining. 262 00:13:43,240 --> 00:13:48,149 But that hopefully gives you a little bit of an intuition of 263 00:13:48,149 --> 00:13:50,799 well, one, you now know what a singular matrix is. 264 00:13:50,799 --> 00:13:57,849 You know when you can not find its inverse. 265 00:13:57,850 --> 00:14:01,320 You know that when the determinant is 0, you won't 266 00:14:01,320 --> 00:14:01,800 find an inverse. 267 00:14:01,799 --> 00:14:03,729 And hopefully-- and this was the whole point of this 268 00:14:03,730 --> 00:14:07,870 video-- you have an intuition of why that is. 269 00:14:07,870 --> 00:14:10,049 Because if you're looking at the vector problem, there's no 270 00:14:10,049 --> 00:14:12,829 way that you can find-- that either there's no solution to 271 00:14:12,830 --> 00:14:14,650 finding the combination of the vectors that get you to that 272 00:14:14,649 --> 00:14:16,199 vector, or there are an infinite number. 273 00:14:16,200 --> 00:14:18,030 And the same thing is true of finding the 274 00:14:18,029 --> 00:14:19,089 intersection of two lines. 275 00:14:19,090 --> 00:14:21,480 They're either parallel, or they're the same line, if the 276 00:14:21,480 --> 00:14:22,639 determinant is 0. 277 00:14:22,639 --> 00:14:25,850 Anyway, I will see you in the next video. 278 00:14:25,850 --> 00:14:26,500