# Projection of a point onto a line

I am given the line $l:\langle x,y,z\rangle = \langle1,2,4\rangle + \lambda\langle-1,0,8\rangle, \lambda\in \mathbb{R}$.

I am asked to find the projection (as a vector) of the point, $A\equiv(1,1,1)$ onto the line $l$.

I know the equation for projection of a vector onto another vector, and I can find the projection of a point onto a line that would give me a point as the end result. I do not know how to find the projection of a point onto a line (in that form) that would give me a vector as a result. Is there a formula/series of steps to do this?

• Mar 9, 2015 at 12:12

We need a point $\;B\;$ on the line s.t. $\;\vec{BA}\perp(-1,0,8)\;$ (why?) . Since any such point $\;B\;$ is of the form $\;(-t+1\,,\,2\,,\,8t+4)\;,\;\;t\in\Bbb R\;$ , we need to solve the equation

$$0=\vec{BA}\cdot(-1,0,8)=(t,-1,-8t-3)\cdot(-1,0,8)=-t-64t-24$$

and then substitute the obtained value of $\;t\;$ back in the expression for $\;B\;$

Cofusing stuff here..................................

• Ah, I understand the steps here. Just one question, why did you do BA and not AB as we're projecting A onto B? Mar 9, 2015 at 13:05
• @OHAiTHARU It is just that I prefer to have both vectors involved in the dot product to be "anchored" on the same or on the same line. Since the line's direction vector is "where $\;B\;$ is", I'd rather have it $\;BA\;$ and not the other way around. It doesn't really matter here, of course. Mar 9, 2015 at 13:07
• @Timbuc: Shouldn't the projection be $\vec B - (1,2,4)$ ? ( The line doesn't pass at $(0,0,0)$, it "starts" at $(1,2,4)$ )
– Dor
Mar 13, 2015 at 14:24

The points of the line have coordinates: $$(x,y,z)=(1-\lambda\;;\;2\;;\;4(1+2\lambda))=(x\;;\;2\;;\;4(3+2x))$$ The plane perpendicular to the line and passing thorough $$A$$ has equation: $$\langle (-1;0;8),(x-1;y-1;z-1) \rangle=0 \Rightarrow -x+8z-7=0$$ The orthogonal projection of $$A$$ on the stright line is the intersection of this plane with the line. Noting that the points of the plane are: $$\left(x;y\;;\; \dfrac{7+x}{8}\right)$$ we have: $$\dfrac{7+x}{8}=4(3+2x) \Rightarrow x= -\dfrac{89}{63}$$ so the searched point is: $$\left(-\dfrac{89}{63}\;;\;2\;;\;\dfrac{44}{63} \right)$$