Proofs of the Reflection Rules I couldn't find a formal proof for the rule:
when a point $(a,b)$ is reflected along $y=x$, it becomes $(b,a)$.
I tried to prove it by sketching out the situation:

However, I still don't know how to prove that $b'=b, a'=a$.
Furthermore, I just want to make sure, for the following two rules:

*

*Reflection Across Y-Axis. $(x,y)\to(-x,y)$

*Reflection Across X-Axis. $(x,y)\to(x,-y)$.

Do they have formal proofs or do we just prove them by visualizing where a point ends up to be on a cartesian plane?
 A: Triangles $(0,0)(1,1)(a,b)$ and $(0,0)(1,1)(b,a)$ are congruent because corresponding sides have equal length (by Pythagoras).
A: To show that $a' = a$ and $b' = b$, consider the triangles formed by $(0,0),(a,0),(0,a)$ and $(0,0),(0,b),(b,0)$.
Using the definition of reflection, conclude that both of these triangles must be isosceles.
A: Let PP' cut y = x at T. Then T= (t, t) for some t.
T lies on PP' whose slope = -1.
From the above, we get $t =  \dfrac{a + b}{2}$
Find the coordinates of P' by recognising T is the midpoint of PP'.
A: To find the coordinates of the reflected point $P'$, let us first find the intersection point of the line $y=x$ and the line perpendicular to that line and passing through the point $P=(a,b)$.
As we know, the equation of the line perpendicular to the line $y=x$ and passing through the point $P=(a,b)$ is$$y=-(x-a)+b.$$So, the intersection point can be obtained by solving the following system of equations as follows.$$\begin{cases} y=x \\ y=-(x-a)+b \end{cases} \quad \Rightarrow \quad M=\left ( \frac{a+b}{2}, \frac{a+b}{2} \right ).$$According to the definition of reflection, the point $M$ is the midpoint of the segment $\overline{PP'}$. So the reflected point $P'$ can be obtained by the following vector addition:$$\overrightarrow{OP'}=\overrightarrow{OP}+ 2 \overrightarrow{PM},$$where $O=(0,0)$ is the origin.
So, we need to do some vector algebra as follows.$$\overrightarrow{PM}=\left ( \frac{a+b}{2}, \frac{a+b}{2} \right ) - \left ( \vphantom{\frac{a}{b}} a,b \right )= \left ( \frac{b-a}{2}, \frac{a-b}{2} \right )$$$$\Rightarrow \quad \overrightarrow{OP'}=  \left ( \vphantom{\frac{a}{b}} a,b \right )+ 2 \left ( \frac{b-a}{2}, \frac{a-b}{2} \right )=(b,a).$$Thus, the coordinates of the reflected point $P'$ is$$P'=(b,a).$$

Addendum
We can also find the coordinates of the reflected point by equating the distances of the points $P$ and $P'$ from the Point $M$ as follows (Please note that the point $P'$ lies on the line $y=-(x-a)+b$).$$d_{P',M}=d_{P,M}$$$$\Rightarrow \quad \sqrt{\left ( x- \frac{a+b}{2} \right )^2+ \left ( (-x+a+b) - \frac{a+b}{2} \right )^2}= \sqrt{ \left ( a- \frac{a+b}{2} \right )^2 + \left ( b - \frac{a+b}{2} \right )^2}$$$$ \Rightarrow \quad x=a \quad \text{ or } \quad x=b$$ $x=a$ corresponds to the point $P$. Thus, the coordinates of the reflected point $P'$ is$$P'=(b,a).$$
