The input is b, the projection matrix is P. The projection P is the projection matrix acting on whatever the input is. The projection is carried out by some matrix that I'm going to call the projection matrix.Īnd in other words the projection is some matrix that acts on this guy b and produces the projection. So really, this - I want to look at this as the projection - there's a matrix here. The projection's still in the same place.Īnd of course if I double a I get a four up above, and I get a four - an extra four below, they cancel out, and the projection is the same. Right? Because I'm just - the line didn't change. What if I double the vector a that I'm projecting onto? If I put in an extra factor two, then P's got that factor It's going to be twice as far, if b goes twice as far, the projection will go twice as far. So suppose I instead of that vector b that I drew on the board make it two b, twice as long - what's the projection now? P is a times this neat number, a transpose b over a transpose a.Ĭan I ask a couple of questions about it, just while we look, get that digest that formula. Actually let's look at that for a moment first. Here's the last thing I want to do - but don't forget those formulas. One more like lift it up into linear algebra, into matrices. can I do add just one more thing to this one-dimensional problem? So do you see that I've got two of the three formulas already, right here, I've got the - that's the equation - that leads me to the answer, here's the answer for x, and here's the projection. x is a transpose b over a transpose a.Īnd P, the projection I wanted, is - that's the right multiple.Īnd the projection is P is a times that x.īut I'm really going to - eventually I'm going to want that x coming on the right-hand side. Right? I have a transpose b as one f- one term, a transpose a as the other, so right away here's my a transpose a.Īnd I get the answer. So if I simplify that, let's see, I'll move one to - one term to one side, the other term will be on the other side, it looks to me like x times a transpose a is equal to a transpose b. Let me just raise the board and simplify that and out will come x. The fact that a is perpendicular to a is perpendicular to e.ĭo you see that as the central equation, that's saying that this a is perpendicular to this - correction, that's going to tell us what x is. The key fact is - the key to everything is that perpendicular. So this is going to be simple in 1-D, so let's just carry it through, and then see how it goes in high dimensions. So really it's that number x I'd like to find. So we know it's in that one-dimensional subspace, it's some multiple, let me call that multiple x, We know that P, this projection, is some multiple of a, right? The formula that we want comes out nicely and what's the - what do we know? So if we were doing trigonometry we would do like we would have angles theta and distances that would involve sine theta and cos theta that leads to lousy formulas compared to linear algebra. Let me also say, look - I've drawn a triangle there. That's got to tell us - that's the one fact we know, that's got to tell us where that projection is. That this - the error - this is like how much I'm wrong by - this is the difference between b and P, the whole point is - that's perpendicular to a. The whole point is that this best point, that's the projection, P, of b onto the line, where's orthogonality? What's the - where does orthogonality come into this picture? So where's the point closest to b that's on that line?Īnd let me connect that and - and what's the whole point of my picture now? I'd like to find the point on that line closest to a.Ĭan I just take that problem first and then I'll explain why I want to do it and why I want to project on other subspaces. So just to so you see what the geometry looks like in when I'm in - in just two dimensions, I'd like to find the point along this line so that line through a is a one-dimensional subspace, so I'm starting with one dimension. Let me start by just projecting a vector b down on a vector a. OK, guys the - we're almost ready to make this lecture immortal.