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?

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