# Proof for the projection of vector u on v

I was trying to prove that $proj_v(u)=\frac{v·u}{||v||^2}$ v, and I was getting close, but then a friend spoiled the fun of completing the proof by giving me what he called a "hint". Blurting out a key part in a proof isn't a "hint". Needless to say, after this, I immediately knew what to do to complete the proof, but as I looked back at my original approach, I can't help but wonder what was wrong with it. I tried it, but with it I got answers like the zero vector or even an infinite number of answers, and I don't know why.

What I did was I defined the projection of u onto v to be the vector x such that (u- xv=0 (because of the orthogonality). If I break these vectors down into their component forms, with the components of x $\langle$ x$_1$, x$_2\rangle$ being treated as variables, (and the components of u and v as constants) then we get an infinite number of answers, since we have 2 variables. Why does this approach to the problem give me an infinite number of answers, when there is clearly one unique solution? Thank you.

-
You wrote that $(u-x).v$ has "clearly" only one solution. Are you sure about it? Try to draw a picture and find missing condition. (I hope this classifies as a hint.) – Martin Sleziak Jul 19 '11 at 7:01
That was a great hint; it told me what was wrong, without giving me too much information. Thank you. – Hautdesert Jul 20 '11 at 6:54

Nice try, but as everyone said, if you're trying to define a projection, at least define it to be in the span of the vector $V$, i.e. $x$ should be co-linear to it.

What people are trying to explain is that it is not clear that $x$ is colinear to $v$ in your definition, and there are indeed counter-examples. For instance, if you suppose that $u$ and $v$ are already orthogonal, your choice of $x$ is simply any multiple of $u$, because $$(u-\lambda u) \cdot v = (1-\lambda)(u \cdot v) = 0.$$ What you would want to do is the exact same thing, but suppose further more that $x$ is co-linear to $v$, hence $x = \lambda v$, and solve for $\lambda$. Your idea was pretty good ; you were just missing one point.

That does not classify as a hint though. I would've skipped the "What you would want to do" part if I just gave a hint.

Since you already know the answer from your spoiler, here it is in my opinion : Let $\lambda v$ be the projection of $u$ on $v$ defined as a solution of $(u-\lambda v)\cdot v = 0$. Then $u \cdot v - \lambda v \cdot v = 0$, hence $\lambda = \frac{u \cdot v}{v \cdot v}$, which gives you $$\text{proj}_v(u) = \frac{u \cdot v}{v \cdot v} v.$$

-
Ah, of course! I forgot that x MUST be a scalar multiple of v. Thanks. – Hautdesert Jul 20 '11 at 7:05

The idea was right, but we need a further condition on $x$, namely that $x$ is "along" $v$. I don't want to spoil the fun by translating the "along" into symbols! But draw a picture, and things should become clear.

If a translation proves necessary, please send a message.

-