What is the rule when reflecting across the line y = x

Answer: switch the x and y values of the coordinates
(x, y) —> (y, x)