# Why does reflecting a point (x,y) about y=x result in point (y,x)?

I noticed that whenever reflecting a point (x,y) about the line y=x the x and y coordinates become swapped in order to give (y,x). However, I do not know why this is the case. Is there any way to geometrically/mathematically prove that this will always happen?

-
Hint : Write $(x,y) = x e_1 + y e_2$ and notice that the linear transformation applied to $e_1$ and $e_2$ gives $e_2$ and $e_1$ respectively. – Amateur Apr 5 '14 at 21:32
Think about where the coordinate axes get mapped to. – David H Apr 5 '14 at 21:32

Because the segment joining $(x,y)$ to $(y,x)$ is in the direction of the vector $(x,y)-(y,x)=(x-y)\cdot(1,-1)$ hence it is orthogonal to the line $L=\{(u,v)\mid u=v\}$ whose direction is the vector $(1,1)$, and because its middle point is on $L$. These two properties (orthogonality+middle point) characterize the reflection about $L$.
Consider the points $A(x;x)$, $B(y;y)$, $M(x,y)$, and M' the reflexion of $M$.
$AM=BM=|x-y|$, and therefore by reflexion $AM'=BM'$. Thus $AMBM'$ is a parallelogram (we proved its a rhombus, and it's actually a square). From there coordinate calculations, be it by vector equalities or the fact that $[MM']$ and $[AB]$ share a middlepoint $\left(\frac{x+y}{2};\frac{x+y}{2}\right)$, gives you the result.