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:
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.