# How many points uniquely define a square?

I was wondering how many points uniquely define a square. Now it is clear to me that if we have $$n$$ random points on a square then this does not necessarily uniquely define the square (for example they may all lie on the same edge).

My question was more the following: supposing I was able to choose exactly which points of my square to use, what is the minimum number of points I could pick to uniquely define the square, and which points should I pick?

Edit: the points need not lie on the vertices.

• Isn’t it 3? Pick three corner points. Jun 27 at 18:17
• @EDX Which four points are enough? If you pick the four corners, then I can for example draw a different square for which those four points lie on the midpoints of the sides, so that's not enough. Jun 27 at 18:23
• @EDX I think it depends on how we understand the question. If we take a square and pick the four corner points, there will actually be infinitely many squares containing those points, although they won't be in the corners. Jun 27 at 18:24
• @subrosar yes the points need not lie on the corners
– JLB
Jun 27 at 18:24
• I can not think of a way to have four points uniquely define a square, but five points should suffice. so long as exactly one set of the three points are colinear. From the three that are colinear we can tell the orientation of the square as any other edges must come at 90 degree angles to it. From there you should be able to draw lines which the edges will fall upon. You should be able to then find the distance between opposite lines which will be the edge length and you should be able to complete the square from there. Jun 27 at 18:37

Four points can be enough to unambiguously define a square.

Take two of the corners, an additional point from the edge between those corners, and an additional point from the middle of the edge opposite the edge the first three points lied on.

A second observer coming to look at these points having been told they all lie on the same square will learn from the three colinear points the orientation of the square and that these lie on the same edge and additional edges will either be perpendicular or parallel to this.

They will then note that since if drawing a perpendicular from the fourth point to this edge it lands in the middle of the edge formed by our colinear points that this must be on the opposite edge. Next, since they know this opposite edge must be parallel to the original edge we now know the lengths of the edges must be equal to this minimum distance between our fourth point and the edge formed by our three colinear points.

Finally, having noted that this length is equal to the length between our colinear points that these two must have been corners of our square.

• That's easier than my construction; well done! Jun 27 at 18:58

Four points are enough, if chosen correctly.

In particular, I claim that the only square which passes through the four points $$A(0,0)$$, $$B(0,0.3)$$, $$C(0.4,0)$$, and $$D(1,1)$$ is the unit square with corners $$(0,0), (0,1), (1,0), (1,1)$$. The solution lets you find many more similar examples.

To prove this claim, here are some inequalities about the distances between points on a square with side length $$s$$:

• Two points on the same side are at a distance between $$0$$ and $$s$$;
• Two points on adjacent sides are at a distance between $$0$$ and $$\sqrt2 s$$;
• Two points on opposite sides are at a distance between $$s$$ and $$\sqrt 2 s$$.

We can check that if $$A,B,C,D$$ lie on a square, then they can't all lie on two adjacent sides of the square: there's no two lines that contain all four points and intersect at right angles. (It's enough to check that $$AB$$ is not perpendicular to $$CD$$, $$AC$$ is not perpendicular to $$BD$$, and $$AD$$ is not perpendicular to $$BC$$.) So there must be some pair of points on opposite sides.

The six distances between the points are $$AB=0.3$$, $$AC=0.4$$, $$BC=0.5$$, $$CD \approx 1.16$$, $$BD \approx 1.22$$, and $$AD \approx 1.41$$. So we see that if any two of $$A,B,C$$ were on opposite sides, the side length $$s$$ would be at most $$0.5$$, but $$D$$ is more than $$0.5 \sqrt2 \approx 0.71$$ away from all the rest. Therefore $$A,B,C$$ are all on two adjacent sides of the squares.

In particular, one side of the square must contain two of $$A,B,C$$. Can a side of the square contain $$B$$ and $$C$$? No: line $$BC$$ separates $$A$$ from $$D$$, which a side of the square can't do. If we assume $$A,B$$ are on one side of the square and $$C$$ is on an adjacent side, or that $$A,C$$ are on one side of the square and $$B$$ is on an adjacent side, we get the same conclusion: the square has a corner at $$A$$ with one side containing segment $$AB$$ and one side containing segment $$AC$$.

Since $$D$$ does not lie on either line, it must be on one of the other sides of the square: a side parallel to $$AB$$, and a side parallel to $$AC$$. We get the same square and try both.

• If we draw line $$AB$$, line $$AC$$, and a line through $$D$$ parallel to $$AB$$, those lines must contain three sides of the square. The only such square is the unit square.
• If we draw line $$AB$$, line $$AC$$, and a line through $$D$$ parallel to $$AC$$, those lines must contain three sides of the square. The only such square is the unit square.

Three points are never enough.

Take three points $$A,B,C$$. If they form a right triangle, we can draw ever-bigger squares with that right angle as a corner, containing all three. If they form an obtuse triangle, that's even better; suppose without loss of generality that the altitude from $$C$$ lands on line $$AB$$ at a point $$H$$ outside segment $$AB$$. Then we can draw ever-bigger squares with one corner at $$H$$ containing all three points.

For an acute triangle, begin by rotating the points arbitrarily. Let $$x_{\min}, x_{\max}, y_{\min}, y_{\max}$$ be the lowest and highest $$x$$- and $$y$$-coordinates among the three points; exclude the finitely many orientations where there are ties. Draw the four lines $$x = x_{\min}, x=x_{\max}, y = y_{\min}, y = y_{\max}$$; each of them passes through one point and together they contain all three (otherwise we'd get an obtuse angle). One of the points lies on two of the lines.

Without loss of generality, $$A$$ lies on $$x = x_{\max}$$ and $$y = y_{\max}$$ and also $$x_{\max} - x_{\min} \ge y_{\max} - y_{\min}$$. Then erase the line through $$y = y_{\max}$$ and instead draw the line through $$y = y_{\min} + x_{\max} - x_{\min}$$. These four lines define a square containing all three points. Since we get this for all but finitely many ways to rotate $$A,B,C$$ (equivalently, for all but finitely many choices of a horizontal and vertical direction) we get infinitely many squares.

• Ahhhhh now I see why three doesn’t suffice. Jun 27 at 20:19

If you specify what points you chose, then two are sufficient: choose opposite vertices. A diagonal can then be drawn between them, and a perpendicular bisector of the same length can be drawn, with the ends being the other two vertices. Then the sides can be drawn between them.

• Sometimes the simple answer is the correct answer… “supposing I was able to choose exactly which points of my square to use, what is the minimum number of points I could pick”
– Matt
Jun 28 at 7:27
• @Matt There is still some ambiguity. If Alice wants to communicate to Bob what square she has, two points being sufficient requires not only that Alice can choose which points to tell Bob, but that Bob knows that Alice chose those points. If all that Bob knows is that these two points are on the square, but doesn't know that they are opposite vertices, then Bob will not know which square they're from. Jun 29 at 0:55
• I understand your point, but also Bob knows it is a square and not some other completely irregular shape (otherwise the problem would be impossible). So it is reasonable Bob could know the two points are opposite vertices
– Matt
Jun 29 at 6:42
• Acccumulation : you require some communication between two persons must succeed and Matt : you assume such persons are perfectly reasonable in optimizing. But OP only is about one person figuring it out on its own. If that person knows about his own invented conventions (one could claim that to be cheating), two points would be enough. Jul 3 at 22:30

Two points are enough if they are ordered - a corner A, and the corner B clockwise from A. This is the minimum, as a square has 4 degrees of feeedom - center, size, and orientation.

A slighly different question is: whats the minimum number of points such that one and only one square will lie on them. 5 is enough - four corners and somewhere on an edge. Four might be enough.