Let A(3,4) and C(1,−1) be the given opposite angular points of a square ABCD and let B(x,y) be the unknown vertex. Then, AB=BC ⇒(AB)2=(BC)2 ⇒(x−3)2+(y−4)2=(x−1)2+(y+1)2 ⇒4x+10y−23=0 ⇒x=(423−10y).....(i)
Also in right △ABC, (AB)2+(BC)2=(AC)2 ⇒(x−3)2+(y−4)2+(x−1)2+(y+1)2 =(3−1)2+(4+1)2 ⇒x2+y2−4x−3y−1=0......(ii)
Substituting the value of x from Eq. (i) into Eq. (ii), we get (423−10y)2+y2−4(423−10y)−3y−1=0 ⇒4y2−12y+5=0
or (2y−1)(2y−5)=0 ∴y=21 or =25
Putting y=21 in Eq. (i), we get x=29
and putting y=25 in Eq. (i), we get x=−21
Hence, the required vertices of the square are (29,21) and (−21,25)