Let ABCD be a square and let A(5, 4) and C(1, -6)
Let (x,y) be the coordinates of B.
In right triangle ABC
Substituting the value of x form (1) in (2), we get
Substituting y= -3 and y=1 in equation (1), we get
Hence, the required vertices of the square are (-2,1) and (8,-3).