# Orthogonal projection of a point onto a line

please give me a directions how to solve this:

find an orthogonal projection of a point T$(-4,5)$ onto a line $\frac{x}{3}+\frac{y}{-5}=1$

-
The equation of your line is written in such a way that you know the $x$- and $y$-intercepts, which makes calculating the slope easy. Construct the equation of the line perpendicular to that and passing through the given point. You now have two lines; find their intersection point. –  Guess who it is. Sep 7 '11 at 18:28
i solved it graphically using GeoGebra i53.tinypic.com/ei2ekk.jpg, it's probably correct. –  jbennet Sep 7 '11 at 18:46
Get the slope of second line. From that you get the slope of the perpendicular. You have the point T and the slope of the perpendicular, so you have eq of the perpendicular line. Solve simultaneous equations in x and y to get intersection. –  I J Sep 7 '11 at 18:52

The slope of the line $r$, with equation $\frac{x}{3}+\frac{y}{-5}=1$, is $m_{r}=\frac{5}{3}$ (because $\frac{x}{3}+\frac{y}{-5}=1$ is equivalent to $y=\frac{5}{3}x-5$). The slope of the line $s$ orthogonal to $r$ is $m_{s}=-\frac{3}{5}$ (because $m_{r}m_{s}=-1$). Hence the equation of $s$ is of the form

$$y=-\frac{3}{5}x+b_{s}.$$

Since $T(-4,5)$ is a point of $s$, we have

$$5=-\frac{3}{5}\left( -4\right) +b_{s},$$

which means that $b_{s}=\frac{13}{5}$. So the equation of $s$ is

$$y=-\frac{3}{5}x+\frac{13}{5}.$$

The coordinates of the orthogonal projection of $T$ onto $r$ are the solutions of the system

$$\left\{ \begin{array}{c} y=\frac{5}{3}x-5 \\ y=-\frac{3}{5}x+\frac{13}{5}, \end{array} \right.$$

which are $(x,y)=\left( \frac{57}{17},\frac{10}{17}\right)$.

-
Thank you very much, you helped me a lot. –  jbennet Sep 7 '11 at 18:54
@jbennet: You are welcome. Glad to help. –  Américo Tavares Sep 7 '11 at 18:56

I'd like to solve the problem using orthogonal projection matrices.

If the line is passing through the origin, it will be very simple to find the orthogonal projection. Suppose $p$ is the given point, $v$ is the given line (passing through the origin, so represented by a vector). Then the orthogonal projection point is $$\frac{vv^T}{v^Tv}p$$

Now the given line does not pass through the origin. But it can be convert to the simple problem above. Choose a point $p_0=(x_0,y_0)^T$ on the given line. Move the origin to $p_0$ (later move back). Then the line can be represented by a vector $v$, and the original given point becomes $p_1=p-p_0$. Now compute $\frac{vv^T}{v^Tv}p_1$. Then move the origin back, we get the orthogonal projection in the original coordinate system is $$\frac{vv^T}{v^Tv}(p-p_0)+p_0=\frac{vv^T}{v^Tv}p+\left(I-\frac{vv^T}{v^Tv}\right)p_0$$.

Specifically, for your problem, $p=(-4,5)^T$. Choose $p_0=(0,-5)^T$, then $$\frac{vv^T}{v^Tv}p+\left(I-\frac{vv^T}{v^Tv}\right)p_0=(\frac{57}{17},\frac{10}{17})^T$$

-
Nice solution. It is a pity that linear algebra textbooks seldom contain exercises or solutions like this, making students lose chances to appreciate the geometric intuitions behind various ideas in linear algebra. –  user1551 Sep 8 '11 at 4:21
Thanks. I agree. BTW, in the figure above, $\frac{vv^T}{v^Tv}p$ should be the red projection point, in stead of that read line segment. –  Shiyu Sep 8 '11 at 6:51

It is the intersection of the line $\frac{x+4}{5}=\frac{y-5}{-3}$ and the line you gave.

-