Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is what my textbook wants me to do:

The matrix of the linear transformation $P_L$ that projects $\mathbb{R}^2$ on de straight line $l \leftrightarrow y = mx$ is:

\begin{pmatrix} \frac{1}{1+m^2} & \frac{m}{1+m^2} \\ \frac{m}{1+m^2} & \frac{m^2}{1+m^2} \\ \end{pmatrix}

And I get this picture, which probably is their to inspire me:

Projection of A to C on a line

Now, I tried to tackle this with the perpendicular line between A and C, but I got nowhere:

\begin{align*} A &= (x_A, y_A) \\ &\Downarrow \\ AC \leftrightarrow y - y_A &= \frac{-1}{m}(x - x_A) \\ &\Downarrow \\ C &\leftrightarrow \begin{cases} y = \frac{-x}{m} + \frac{x_A}{m} + y_A \\ y = mx \\ \end{cases} \end{align*}

But that's were I am stuck, I can't get it to the form

\begin{align*} \begin{bmatrix} x_C \\ y_C \end{bmatrix} &= \begin{bmatrix} \frac{1}{1+m^2} & \frac{m}{1+m^2} \\ \frac{m}{1+m^2} & \frac{m^2}{1+m^2} \\ \end{bmatrix} \begin{bmatrix} x_A \\ y_A \end{bmatrix} \end{align*}

I am probably not doing it right. All tips are greatly appreciated.

share|cite|improve this question
up vote 1 down vote accepted

You are off to a great start!

If you substitute your second equation into your first, you find $$mx=-\frac{x}{m}+\frac{x_A}{m}+y_A,$$ so $$\frac{1+m^2}{m}x=\frac{x_A}{m}+y_A,$$ and so $$x=\frac{1}{1+m^2}x_A+\frac{m}{1+m^2}y_A,\tag{$\star$}$$ which corresponds to what your first row should be.

Once you've found that, use $(\star)$ to substitute into your second equation, and you readily see that $$y=\frac{m}{1+m^2}x_A+\frac{m^2}{1+m^2}y_A,$$ which corresponds to the second row.

share|cite|improve this answer
So, I was close! Thank you very much for the last missing bits. It seems obvious now. – user21385 Jun 17 '12 at 19:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.