If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:14:37

Video transcript

let's say I have a line that goes through the origin I'll draw it in r2 but this can be extended to an arbitrary RN we draw my axes those are my axes right they're not perfectly drawn but I think you get the idea let me draw a line that goes through the origin here so that is my line there and we know that a line in any RN we're doing it in r2 can be defined as just all of the possible scalar multiples of some vector so let's say that this is my some vector right here that's on the line we can define our line we could say L is equal to the set of all the scalar multiples let me say that this is vector let's say that that is V right there so it's all the possible scalar multiples of our vector V where the scalar multiples by definition or they're just any real they're just any real number so obviously if you can if you take all of the possible multiples of be both positive multiples and negative multiples and less than one multiples fraction multiples you will define you'll have a set of vectors that will essentially define or I can specify every point on that line that goes through the origin and we know of course this wasn't a line that went through the origin you would have to shift it by some vector would have to be some other vector plus CV but anyway we're starting off with this line definition that goes through the origin what I want to do in this video is to define the idea of a projection of a projection onto L of some other vector X of some other vector so let me draw my some other vector X let's say that this right here is my other vector X now a projection I'm going to give you just a sense of it and then we'll define a little bit more precisely a projection I always imagined if you had some light source that were perpendicular somehow orthogonal to our line so let's say our light source the light was shining down like this because and I'm doing that direction because that is perpendicular to my line I imagine the projection of X onto this line is kind of the shadow of X so if I were if this light was coming down I would just draw a perpendicular like that and the shot of X onto L would be that vector right there so we can kind of view it as the shadow shadow of X on our line L that's one way to think of it another way to think of it in you can think of it however you like is how much of X goes in the L directions o and but the the technique would be the same you draw perpendicular from X to L and you say okay then what do i how much of L have to go in that direction to get to my perpendicular either of those are how I think of the idea of a projection I think the shadow is part of the motivation for why you it's even called a projection right when you project something you're kind of beaming light and seeing where the light hits on a wall and you're kind of doing that here you're beaming light and you're seeing where that light hits on a line in this case but this isn't a you can't do anything with this definition this is just kind of an intuitive sense of what a projection is so we need to figure out some way to calculate this or a more mathematically precise definition and one thing we can do is when I created this projection let me actually draw another projection of another line so or another vector just you get the idea if I had some other vector over here that look like that the projection of this onto the line would look something like this you just draw a perpendicular and this projection would be like that so I don't want to dot for just this case I want to give you the sensitive script the shadow of any vector onto this line so how can we think about it with our original example well every case no matter how I perceive it I drew I dropped a perpendicular down here and so if we can be constructive vector right here we could say hey that vector is always going to be perpendicular to the line and we can do that I would have been talking about it if we couldn't so let me define this vector which I'm not even define it what is this vector going to be if this vector let me not use all these misses let me say that this vector we know we want to somehow get to this blue vector let me yeah let me keep it in blue that blue vector is the projection of X onto L that's what we want to get to now one thing we can look at is this pink vector right there what is that pink vector that pink vector that true this is this is X that's the vector X minus the projection minus this blue vector over here minus the projection of X onto L right if you add the projection to the pink vector you get X so if you add this blue projection of X to X minus the projection of extra or it's going to get X we also know that this pink vector is orthogonal to the line itself which means it's orthogonal to every vector on the line which also means that this dot product is going to be 0 so let me let me define the projection this way the projection this is going to be my slightly more mathematical definition the projection of onto L of some vector X is going to be some vector some vector that's in in L right I drew it right here this blue vector I'll trace it with white right here some vector in L where where and this might be a little bit unintuitive where X minus where X minus the projection vector X minus the projection onto L of X is orthogonal is orthogonal to my line so I'm saying the projection this is my definition I'm defining the projection of X onto L to some vector in L where X minus that projection is orthogonal to L this is my definition that is a little bit more precise and I think you makes it makes a bit of sense why it connects to the idea of n of the shadow or a projection but how can we deal with this I mean this is still just in words how can actually calculate the projection of X onto L well the key clue here is this notion that X minus the projection of X is orthogonal to L so let's see if we can use that somehow so the first thing we need to realize is by definition because the projection of X onto L is some vector in L that means that some scalar multiple of V some scalar multiple of our defining vector of our V right there so we could also say we could say hey look we could rewrite our projection ah of X onto L we could write it as some scalar multiple times our vector V right we can say that this is equivalent to our projection now we also know that X minus our projection is orthogonal to L so we also know that X minus our projection and I could I just said that I could rewrite my projection is some multiple of this vector right there you can see it the way I drew it read it's almost looks like it's two times this vector so we know that X minus our projection this is our projection right here it is orthogonal to L orthogonal ax T by definition means it's dot product with any vector in L is 0 so let's dot it with some vector and L well we could dot it with we can dot it with this vector V that's what we used to define now so let's dot it with V and we know that that must be equal to 0 we're taking this vector right here dotting it with V and we know that this has to be equal to 0 that has to be equal to 0 so let's use our properties of dot products to see if we can calculate a particular value of C because once we know a particular value of C then we can just always multiply that times about the vector V which we are given and we will have our projection and then I'll show it to you with some actual numbers so let's see if we can calculate a C so if we distribute the C or sorry if we distribute the V we know the dot product exhibits the distributive property this expression can be rewritten as as X dot V right X dot V minus C times V dot V C times V dot V I rearranged things we know that the scalar we know that C minus C V dot V is the same thing we could write it as minus C V so minus C times V dot V and all of this of course is equal to 0 and then if we want to solve for C let's add C V dot V to both sides of the equation and you get X dot V is equal to C times V dot V solving for C let's divide both sides of this equation by V dot V you get there in a different color C is equal to this X dot V divided by V dot V now what we'll see see was we sang the projection of X let me write it here the projection of X onto L is equal to some scalar multiple right we know it's in the line we know it's in the line so it's some scalar multiple of this defining vector some scalar multiple of the vector V and we just figured out what that with that scalar multiple is going to be it's going to be it is going to be X dot V over V dot V and this of course is just going to be a number right this is a scalar still even though we have all these vectors here when you take their dot products you just end up with the number and you multiply that number times V you just kind of scale V and you get your projection so in this case the way I drew it up here my dot product should end up with some scaling factor that's you know maybe close to two so that if I taste art with a V and I scale it up by two this value would be two and I'd get a projection that looks something like that now this is looks a little abstract to you so let's do it with some real vectors and I think it'll make a little bit more sense and nothing I did here only applies to r2 everything I did here can be extended to an arbitrarily high def dimension so even though we're doing an r2 and r2 and r3 is where we tend to deal with projections the most this could apply to RN let me do it this particular case let me define L let's let me define my line L to be the set of all scalar multiples of the vector I don't know let's say the vector to one such that all of them are you know any the C is any real number so let me draw my let me draw my axes here that's my vertical axis this is my horizontal axis right there and so my line is all the scalar multiples of the vector 2.1 and actually let me just call my vector 2.1 let me call that right there the vector V let me draw that so I go 1 2 go up 1 that right there is my vector V vector V right there and the line is all of the possible scalar multiples of that so let me draw that so all the possible scalar multiples of that you just keep going in that direction or you keep going backwards in that direction or anything in between that's what my line is if we just all of the scalar multiples of my vector V my vector of my vector V now let's say I have another vector X let's say I have a vector X now let's say that X is equal to 2/3 let me draw X X is 2 and then you go 1 2 3 so X will look like this vector X will look like that now let me draw a little bit better than that vector X will look like that that is vector X what we want to do is figure out the projection of X onto L we can use this definition right here so let me write it down the projection of X onto L is equal to what it's equal to X dot V right where V is kind of the defining vector for our line so it's equal to X which is 2 3 dot V which is 2 1 2 1 all of that over V dot V so all of that over 2 1 dot 2 1 times our original defining vector V so what's our original defining vector it's this one right here 2 1 so times the vector 2 1 and what is this equal see when you take 2 when you take these two dot at each other you have 2 times 2 plus 3 times 1 so 4 plus 3 so you get 7 this all simplified to 7 and then this you get 2 times 2 plus 1 times 1 so 4 plus 1 is 5 so you get 7 v that all simplified to 5 that was a very fast simplification you might have been daunted by this kind of strange-looking expression but we take dot products they actually tend to simplify quite very quickly and then you just multiply at times your defining vector for the line so we're scaling it up by a factor by a factor of seven fifths so multiply it times the vector 2 1 and what do you get you get the vector we do it a new color you get the vector 14 over 5 and the vector 7 over 5 and just so we can visualize this or plot a little better let me write it as decimals 14 over 5 is 2 and 4/5 which is 2.8 and this is 1 and 2/5 which is 1.4 and so the projection of X onto L is 2.8 1.4 so let's see 1 2 2.8 is right about there and I go 1 point 4 is right about there so the vector is going to be right about there I haven't even drawn this to precisely but you get the idea this is the projection our computation shows us that this is the projection of X onto L and if we draw a perpendicular right there we see that it's consistent with our idea of this being the shadow of X onto our line L well now now we actually can calculate projections in the next video I'll actually show you how to figure out a matrix representation for this what's essentially a transformation