1. ## Linear Transformation

How would you find the linear transformation that takes each (x,y) point and projects onto the line y=x?

2. How do you want points to travel to the line y = x? I could easily think of a way to do this using rotation matrices. But then a point would not travel to the closest point on y = x from its original location. It would travel to the nearest point on y = x that is on the circle with radius equal to its own distance from the origin. In other words, they would travel around on a circle until they reached y = x. But if you use the term "projection", I think you mean that each point goes straight towards the nearest point on y = x, right?

3. I would interpret "projection" as meaning "orthogonal projection". That is, to project $(x_0, y_0)$ onto the line y= x, draw the line throught $(x_0, y_0)$ perpendicular to the line y= x. The projection is at the intersection of those two lines.

Of course, any line perpendicular to y= x is of the form y= -x+ A. Taking $y= y_0$, $x= x_0$, We have $y_0= -x_0+ A$ so that $A= x_0+ y+0$. The line perpendicular to y= x is $y= -x+ x_0+ y_0$. That intersects the line y= x when $x= -x+ x_0+ y_0$ or $2x= x_0+ y_0$ so that $x= \frac{x_0+ y_0}{2}$.

The point $(x_0, y_0)$ is projected onto the line y= x at the point $\left(\frac{x_0+ y_0}{2},\frac{x_0+ y_0}{2}\right)$.

That is $L((x_0, y_0))= \left(\frac{x_0+ y_0}{2}, \frac{x_0+ y_0}{2}\right)$

You could also write this as the matrix multiplication
$\begin{bmatrix}\frac{1}{2} & \frac{1}{2} \\ \frac{1}{2} & \frac{1}{2}\end{bmatrix}\begin{bmatrix}x_0 \\ y_0\end{bmatrix}$