Problem:
Consider the points A(0,12),B(10,9),C(8,0), and D(β4,7). There is a unique square S such that each of the four points is on a different side of S. Let K be the area of S. Find the remainder when 10K is divided by 1000.
Solution:
Because AC and BD intersect, A and C must be on opposite sides of the square, as must B and D. Name the vertices of the square P,Q,R, and S so that A is on PQβ,B is on QRβ,C is on RS, and D is on SP. Let h and v represent the horizontal and vertical change, respectively, from P to Q. Then Aβ², the projection of A onto RS, has coordinates (0+v,12βh). Let M be the midpoint of AC. Then M has coordinates (4,6) and MA=MAβ², so 42+62=(vβ4)2+(hβ6)2. Similarly, Dβ², the projection of D onto QRβ, has coordinates (β4+h,7+v),N, the midpoint of BD, has coordinates (3,8), and ND=NDβ², so 72+12=(hβ7)2+(vβ1)2. The two equations imply that 12h+8v=h2+v2=14h+2v, and so h=3v. Then 12h+8v=h2+v2 yields 36v+8v=(3v)2+v2, so v=44/10. Thus K=h2+v2=10v2=10(442/102)=1936/10, so 10K=1936, and the requested remainder is 936β.
OR
Let m be the slope of the side of the square containing B. The line containing this side has equation yβ9=m(xβ10) or mxβy+(9β10m)=0. Similarly, the line containing the side containing C has equation y=(β1/m)(xβ8) or x+myβ8=0. Because the distance from D to the first line is equal to the distance from A to the second line,
Solve to obtain m=5/13 or m=β3. For the square obtained with the first slope, some of the points are on extended sides of the square. This is because A and C are on opposite sides of the line with slope 5/13 that contains B. Thus m=β3. Then K=m2+1(12mβ8)2β=442/10, so 10K=1936, and the requested remainder is 936β .
Query: For four arbitrary points A,B,C,D in the plane, what are the necessary and sufficient conditions that a unique square S exists?