So my question has two parts:

a) Let L be a line given by y=2x, find the projection of $\vec{x}$=$\begin{bmatrix}5\\3\end{bmatrix}$ onto the line L.

So, for this one:

proj$_L$($\vec{x}$) = $\frac{\vec{x}\bullet \vec{y}}{\vec{y}\bullet \vec{y}}$$\times \vec{y}$ = $\frac{(\begin{bmatrix}5\\3\end{bmatrix} \bullet \begin{bmatrix}2\\1\end{bmatrix}}{(\begin{bmatrix}2\\1\end{bmatrix} \bullet \begin{bmatrix}2\\1\end{bmatrix}} ) \times \begin{bmatrix}2\\1\end{bmatrix}$ = $\frac{13}{5} \times \begin{bmatrix}2\\1\end{bmatrix}$ = \begin{bmatrix}5.2\\2.6\end{bmatrix}

b) using the above, find the sitance between L and the terminal point of x.

Here is where I am stuck... my instinct is to just do:

$\begin{bmatrix}5\\3\end{bmatrix} - \begin{bmatrix}5.2\\2.6\end{bmatrix}$ = $\begin{bmatrix}-.2\\.4\end{bmatrix}$

but I'm sure this is incorrect... how would I solve this?


1 Answer 1


Yes, yes, almost done. You need the length of this distance vector, use Pythagorean theorem.

One moment, your line is $y=2x$, then it rather contains $\pmatrix{1\\2}$ than $\pmatrix{2\\1}$ (and its normalvector is $\pmatrix{2\\-1}$)..

  • $\begingroup$ So I would take the dot product of the projection and the vector x, and then divide that by the length of the vectors? (aka (proj DOT x) / (||proj||*||x||)) ? $\endgroup$
    – gfppaste
    Nov 29, 2012 at 0:48
  • $\begingroup$ Your $\vec y$ is rather $\pmatrix{1\\2}$. It will give a bit different solution. Then calculate the difference vector and its length by $||v||=\sqrt{v\cdot v}$. Unless I miscalculated, the distance is $\displaystyle\frac7{\sqrt5}$. $\endgroup$
    – Berci
    Nov 29, 2012 at 0:52
  • $\begingroup$ how did you arrive at $\frac{7}{\sqrt{5}}$ ? I know where the $\sqrt{5}$ came from, but how did you arrive at 7 in the numerator? $\endgroup$
    – gfppaste
    Nov 29, 2012 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.