Algebra (all content)
Matrix word problem: vector combination
Sal finds the appropriate combination of two given vectors in order to obtain a third given vector. This is done by representing the problem with a single matrix equation and solving that equation. Created by Sal Khan.
Want to join the conversation?
- Sal connected two vector b's off of the vector a and got vector c, but if he left vector be where it was, but added one vector b to that and then a vector a, he would have got vector c too. Also, I think it looks like if he takes vector b where its at and adds vector a to it and then adds vector b to that, then he will get vector c....... is that a correct observation? (if that even makes sense, it's hard to type math questions.)(47 votes)
- yes both your observations are correct and can be proved by vector laws as vector x + vector y = vector y+ vector x . So u can add them any way and get the same answer . And for second observation u are just breaking up the adding and instead of saying 2b+a you are saying b+a+b which is also correct .(52 votes)
- In the previous video, the solution for x and y represented an actual point on the Cartesian plane (the intersection of two lines). The choice to use the letters x and y was not arbitrary. In this video, the solution for x and y represents scalars applied to vectors. The choice of letters appears to be totally arbitrary (for example, Sal could have used a and b instead). Can anybody think of any relationship between the letter x in this example and the x on the Cartesian plane?(9 votes)
- Hey Orsini,
You are correct. The x & y here are just random selections, and could have been anything.
But the key here is thinking "isomrphism." Isomorphic thinking is noticing when a new, unfamiliar problem resembles one you know how to solve. And taking the steps necessary to move it into that form. (Just dawned on me--Is that why Linear Algebra textbooks tend to use that x,y,z notation for vector problems like this? Or is it because the initial vectors can be represented on the x,y plane as well?)
Here is a quick recap of the isomorphic "switch".
1) The given problem was three vectors. Traditionally, vectors are drawn on the Cartesian Coordinate system with one end at the origin. (Sal draws this between about3:00and6:00)
2) Figuring out the scalars x and y are difficult here, since the lines do not cross.
3) The genius here is how the problem is "isomorphically" translated into a more familiar, easier to solve form: a system of linear equations. This can be solved (if, of course, the lines are not parallel, [parallel lines generate no solutions since they never cross] or are not the same [this would return an infinite number of solutions]).
4) Once the isomorphic system is solved, you have the scalars you can use for the initial system. (Sal illustrates this at about10:30).
Hope this makes sense. Or, as is often the case, I may have confused the issue more by trying to explain... Still, isomorphic problems are brilliant. Once you learn to see them, they appear everywhere.
And, to really blow your mind--try this on for size:
5) Every common system of linear equations can be expressed as a group column-vectors as well. The isomorphism runs both ways.
And, reading this, I think "God, am I a nerd! Over 40 and still geeky." But loving life. Wish I'd have had a site like this when I was in college. But then again, I may have lost a lot of tutoring money...(24 votes)
- Can anyone point me to a video of vectors introduction? I would like to review basic operation and concepts. Something like what Khan starts doing at3:20(7 votes)
- Hi joaocunhajeronimo.
You can watch the introduction to vectors and scalars in the Physics list: http://www.khanacademy.org/video/introduction-to-vectors-and-scalars?playlist=Physics
I can’t recommend you other videos about vectors because I didn’t see the physics list yet, but I hope you can find them. You can also read a little bit on Wikipedia: http://en.wikipedia.org/wiki/Euclidean_vector (I recommend you the “Representations” section)
Also you should remember that the matrices are arrangements of numbers that represent something else; in this case it represents a vector. When you have a matrix with just one column it is also called a column vector; analogously happens the same with matrices whit just one row (row vector). In this case, the first number represents the “x” value and the second represent the “y” value. If you have a 3x1 matrix (or vector) or a 1x3 matrix (or vector), the third value represents the “z” value. When you have more than 3 values the thing gets funnier because it can represent time or temperature or anything else but I don’t want to confuse you.
Sorry for my poor english, not my native language. Hope this help you, see you.(16 votes)
- 12:45Not to be boring, but rather than pointing at some truth outside the man-made definitions, doesn't this just prove the rigidity and consistency of the mathematical language involved? A linguistic point, circular logic if you will. ;) To me, that's still exciting and a testimony to the power of abstraction. Opinions?(6 votes)
- Boring? Hardly. These sorts of questions are the real fun of math, science and philosophy.
Godel was brilliant. He proved, very cleverly, that for every internally consistent system, there will exist statements that can neither be proved nor disproved using said system.
For instance, in some sense, we can think of language as an "internally consistent" system. But what can we make of this sentence: "This statement is false"? It is a paradox.
Let's break this down...
1) If the statement is initially false, then the sentence "This statement is false" is true. Which is a contradiction.
2) If the statement is initially true, then the sentence "This statement is false" is false. Again, a contradiction.
Godel pulled the same trick, and developed a way to write "paradoxes" in formal algebraic systems. It's been years since I worked it out myself, but I was good fun.(11 votes)
- Since order matters with matrix multiplication, why is Sal multiplying the adjoint of vector A with vector [7, 6] before multiplying the reciprocal of A's determinant with it's adjoint? Is this allowed by some property of matrix inversions? I tried multiplying through in both orders, and got the same result; why does this work in this case?(5 votes)
- That's because A's determinant (and it's reciprocal) is a scalar while the adjugate is a matrix. you can play a bit with scalars to simplify calculations.(6 votes)
- what is the difference between linear algebra and original algebra(5 votes)
- I've never heard of "original algebra," but "linear algebra" is a sub-topic of "algebra" that deals with linear equations (ones that make straight lines when graphed) and systems of these equations.(4 votes)
- I am dealing with something called a Tensor, but for me it is just like a matrix, in fact is is a matrix as far as operations and math goes, and for what we use them in class. But my teacher and books of engineering keep calling them tensors, and the definitions I found in internet are quite useless, they keep using the word tensor and tensor field to define tensor... So can anyone give me an easy to go and understand explanation of what a tensor is, and why a tensor of second order can be viewed as a matrix, and what would be a tensor of third order and the difference with a matrix... Is it really helpful the definition of tensor or it is just another jargon or nomenclature more in the world of mathematics...(5 votes)
- TO MY UNDERSTANDING, tensors represent vectors, scalars, and other tensors. Watch http://www.youtube.com/watch?v=f5liqUk0ZTw for a fairly simple explanation.(3 votes)
- At3:36, Sal says that you have to draw the vector so that the orientation and magnitude are correct. What are orientation and magnitude?(3 votes)
- The 'magnitude' means the size. It's the length of the vector. The 'orientation' just means direction. That's the way the vector is pointed. Two vectors are equal if they have the same length, and they point in the same direction. They can be drawn anywhere on the graph because vectors only convey "magnitude" and "direction," NOT a starting point.
So, for example, a vector whose tail is at (1,1) and whose head is at (4,5) is the same as a vector whose tail is at (2,4) and whose head is at (5,8). They both have the same length. They are both 5 units long (from the pythagorean theorem... they both go up 3 units and to the right 4 units. So the square root of 3 squared plus 4 squared is 5). Also they both point the same direction, because they both have a slope of 3/4. Therefore, even though they are not in the same place on the graph, they are the same vector because their lengths and their directions are the same.(6 votes)
- If we get same solution solving for intersection as we do for linear combination, does it mean that the vector revealed thru linear combo gives coordinates of the point of intersection of the lines? What if the linear combo is multiplicative instead of additive?(3 votes)
- Yes, the vector revealed through the linear combination of the two vectors(one representing x co-ordinates and the other representing y co-ordinates) gives the point of intersection. It is another way to solve for point of intersection.(3 votes)
- Why would you want to find how to add two vectors to get a third?(2 votes)
- One application is physics when you want to find the direction of a force.
Imagine two horses pulling a wagon. Let's say the gray horse is pulling the wagon with a certain force which we will call G. (The standard unit of force is the Newton, but we'll just use letters for now) The brown horse (which is a bit stronger) is pulling with force B. The total force pulling the wagon forward is G + B.
However, and here is where it gets interesting: Suppose that we now attach the gray horse to the back of the wagon and have him pulling in the opposite direction. You have two forces acting on the wagon in opposite directions. B pulling forward and G pulling backward. Now there is still G and B force acting on the wagon, but they are acting against each other. The resultant force pulling the wagon forward is B-G.
Now, if we had two of the Brown horses, one attached to each end of the wagon, the resultant force would be B-B or 0. So, even though 2B of force is acting on the wagon, since each B is acting in the opposite direction, it is as though no force were acting on the wagon and it does not move. Think of that as adding Vector B to Vector -B and getting 0.
Now imagine that two brown horses are attached to the front of the wagon but one is pulling 45 degrees to the right and one is pulling 45 degrees to the left. What direction will the wagon go? Without getting into the equations, we can nevertheless see that the wagon will go forward because each horse is pulling at the same angle, but the resultant force on the wagon will not be 2B. It will be less, because the horses are pulling in different directions. And of course, if one horse decided to pull at 50 degrees, the wagon would start to veer in that direction. Or, if the weaker gray horse pulled right at 45 degrees with a stronger brown horse pulling left at 45 degrees, the wagon would veer left.
Now, think of the horses and their force as vectors. Vector G + Vector B = Vector W where G is the grey horse, B is the brown horse and W is the resultant force and its direction acting on the wagon.
I hope that example helps and makes sense.(5 votes)
In the last video we saw how a matrix and figuring out its inverse can be used to solve a system of equations. And we did a 2 by 2. And in the future, we'll do 3 by 3's. We won't do 4 by 4's because those take too long. But you'll see it applies to kind of an n by n matrix. And that is probably the application of matrices that you learn if you learn this in your Algebra 2 class, or your Algebra 1 class. And you often wonder, well why even do the whole matrix thing? Now I will show you another application of matrices that actually you're more likely to see in your linear algebra class when you take it in college. But the really neat thing here is, and I think this will really hit the point home, that the matrix representation is just one way of representing multiple types of problems. And what's really cool is that if different problems can be represented the same way, it kind of tells you that they're the same problem. And that's called an isomorphism in math. That if you can reduce one problem into another problem, then all the work you did with one of them applies to the other. But anyway, let's figure out a new way that matrices can be used. So I'm going to draw some vectors. Let's say I have the vector-- Let's call this vector a. And I'm going to just write this is as a column vector. And all of this is just convention. These are just human invented things. I could have written this diagonally. I could have written this however. But if I say vector a is 3, negative 6. And I view this as the x component of the vector, and this is equal to the y component of the vector. And then I have vector b. Vector b is equal to 2, 6. And I want to know are there some combinations of vectors a and b-- where you can say, 5 times vector a, plus 3 times vector b, or 10 times victor a minus 6 times vector b-- some combination of vector a and b, where I can get vector c. And vector c is the vector 7, 6. So let me see if I can visually draw this problem. So let me draw the coordinate axes. Let's see this one. 3, negative 6. That'll be in quadrant-- these are both in the first quadrant. So I just want to figure out how much of the axes I need to draw. So let's see-- Let me do a different color. That's my y-axis. I'm not drawing the second or third quadrants, because I don't think our vectors show up there. And then this is the x-axis. Let me draw each of these vectors. So first I'll do vector a. That's 3, negative 6. 1, 2, 3, and then negative 6. 1, 2, 3, 4, 5, 6. So it's there. So if I wanted to draw it as a vector, usually start at the origin. And it doesn't have to start at the origin like that. I'm just choosing to. You can move around a vector. It just has to have the same orientation and the same magnitude. So that is vector a for the green. Now let me do in magenta, I'll do vector b. That is 2, 6. 1, 2, 3, 4, 5, 6. So 2, 6 is right over there. And that's vector b. So it'll look like this. That's vector b. And then let me write down vector a down there. That's vector a. And I want to take some combination of vectors a and b. And add them up and get vector c. So what does vector c look like? It's 7, 6. Let me do that in purple. So 1, 2, 3, 4, 5, 6, 7. Comma 6. So 7, 6 is right over there. That's vector c. Vector c looks like that. I'm going to draw it like that. And that's vector c. So what was the original problem I said? I said I want to add some multiple of vector a to some multiple of vector b, and get vector c. And I want to see what those multiples are. So let's say the multiple that I multiply times vector a is x. And the multiple of vector b is y. So I essentially want to say that-- let me do it in another neutral color-- that vector ax-- that's how much of vector a I'm contributing-- plus vector by-- that's how much of vector b I'm contributing-- is equal to vector c. And you know, maybe I can't. Maybe there's no combinations of vector a and b when you add them together equal vector c. But let's see if we can solve this. So how do we solve? So let's expand out vectors a and b. Vector a is what? 3, negative 6. So vector a, we could write as 3, minus 6 times x. That just tells us how much vector a we're contributing. Plus vector b, which is 2, 6. And then y is how much vector b we're contributing. And that is equal to 7, 6. Vector c. Now this right here, this problem can be rewritten just based on how we've defined matrix multiplication, et cetera, et cetera, as this. As 3, minus 6, 2, 6, times x, y, is equal to 7, 6. Now how does that work out? Well think about how matrix multiplication works out. The way we learned matrix multiplication, we said, 3 times x, plus 2 times y is equal to 7. 3 times x plus 2 times y is equal to 7. That's how we learned matrix multiplication. That's the same thing here. 3 times x, plus 2 times y, is going to be equal to 7. These x and y here are just scalar numbers. So 3 times x plus 2 times y is equal to 7. And then matrix multiplication here, minus 6 times x plus 6 times y is equal to 6. That's just traditional matrix multiplication that we learned several videos ago. That's the same thing here. Minus 6x plus 6y is equal to 6. These x's and y's are just numbers. They're just scalar numbers. They're not vectors or anything. We would just multiply them times both of these numbers. So hopefully you see that this problem is the exact same thing as this problem. And you've maybe had an a-ha moment now, if you watched the previous video. Because this matrix also represented the problem, where do we find the intersection of two lines? Where the two lines-- I'm just going to do it on the side here-- the intersection of the two lines, 3x plus 2y is equal to 7. And minus 6x plus 6y is equal to 6. And so, I had drawn two lines. And we said, what's the point of intersection, et cetera, et cetera. And it was represented by this problem. But here, we have-- well I won't say a completely different problem, because we're learning they're actually very similar-- but here I'm doing a problem of, I'm trying to find what combination of the matrices a and b add up to the matrix c. But it got reduced to the same matrix representation. And so we can solve this the same exactly way we solved this problem. If we call this the matrix a, let's figure out a inverse. So we get a inverse is equal to what? It equals 1 over the determinant of a. The determinant of a is 3 times 6. 18 minus minus 12. So that's 18 plus 12, which is 1/30. And we did this in the previous video. You swap these two numbers. So you get 6 and 3. And then you make these two negatives. So you get 6 and minus 2. That's a inverse. And now to solve for x and y, we can multiply both sides of this equation by a inverse. If you multiply a inverse times a, this cancels out. So you get x, y is equal to a inverse times this. It's equal to 1/30 times 6, minus 2, 6, 3. Times 7, 6. And remember, with matrices, the order that you multiply matters. So on this side, we multiplied a inverse on this side of the equation. So we have to do a inverse on the left side on this side of this equation. So that's why did it here. If we did it the other way, all bets are off. So what does this equal? This is equal to 1/30 times-- and we did this the previous problem-- 6 times 7 is 42, minus 12. 30. 6 times 7, 42. Plus 18. 60. So that equals 1, 2. So what does this tell us? This tells us that if we have 1 times vector a, plus 2 times vector b. 1 times-- this is 1-- and 2 times vector b. So 1 times vector a plus 2 times vector b is equal to vector c. And let's confirm that visually. So 1 times vector a. Well that's vector a right there. So if we add 2 vector b's to it, we should get vector c. So let's see if we can do that. So if we just shift vector b over this way, well vector let's see, vector b is over 2 and up 6. So over 2 and up 6 would get us there. So 1, vector b-- just doing heads to tail visual method of adding vectors-- would get us there. 1, 2, 3. Good. No, let me see. 1, 2, 3. And then vector b goes over two more. two more. So it'll get us up 6. It's like that. So that's 1, vector b. And then if we add another-- but we want 2 times vector b. We essentially need two vector b's. So we had one, and then we add another one. I think visually you see that it does actually-- I didn't want to do it like that. I wanted to use the line tool so it looks neat. So you add another vector b. And there you have it. That's a vector b. So it's 2 times vector b. So it's the same direction as vector b, but it's two times the length. So we visually showed it. We solved it algabraically. But the real learning, and the big real discovery of this whole video, is to show you that the matrix representation can represent multiple different problems. This was a finding the combinations of a vector problem. And the previous one it was figure out if two lines can intersect. But what it tells you is that these two problems are connected in some deep way. That if we take the veneer of reality, that underlying it, they are the same thing. And frankly, that's why math is so interesting. Because when you realize that two problems are really the same thing, it takes all of the superficial human veneer away from things. Because our brains are kind of wired to perceive the world in a certain way. But it tells us that there's some fundamental truth, independent of our perception, that is tying all of these different concepts together. But anyway, I don't want to get all mystical on you. But if you do see the mysticism in math, all the better. But hopefully you found that pretty interesting. And actually, I know I'm going over time, but I think this is-- A lot of people take linear algebra, they learn how to do all of the things, and they say, well what is the whole point of this? But this is kind of an interesting thing to think about. We had this had vector a and we had this vector b. And we were able to say, well there's some combinations of the vectors a and b, that when we added it up, we got vector c. So an interesting question is, what are all the vectors that I could get to by adding combinations of vectors a and b. Or adding or subtracting. Or you could say, I could multiply them by negative numbers. But either way. What are all of the vectors that I can get by taking linear combinations of vectors a and b? And that's actually called the vector space spanned by the vectors a and b. And we'll do more of that in linear algebra. And here we're dealing with a two dimensional Euclidean space. We could have had three dimensional vectors. We could've had n dimensional vectors. So it gets really, really, really abstract. But this is, I think, a really good toe dipping for linear algebra as well. So hopefully I haven't confused or overwhelmed you. And I'll see you in the next video.