Question 1024483
The described process follows the definition of function inverse.



x y pair  (p,r).
Switching the x and y values gives the point  (r,p).
Slope of these two points is  {{{(p-r)/(r-p)=(-1)(r-p)/(r-p)=highlight_green(-1)}}}, and this is for the line connecting  (p,r) and (r,p).


The other line referenced, y=x which can be taken as being in slope-intercept form, has obviously the slope  {{{highlight_green(1)}}}.


Notice that the product of the slopes for (p,r) to (r,p) and line y=x is  {{{-1*1=-1}}}.  The product of two slopes being NEGATIVE ONE, means that the lines are PERPENDICULAR.