8

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.

RobPratt
  • 45,619
JLB
  • 312
  • 2
    Isn’t it 3? Pick three corner points. – Randall Jun 27 '22 at 18:17
  • Certainly more than 3 - rotation – user121330 Jun 27 '22 at 18:18
  • Sorry I should have mentioned, the points don’t need to lie on the vertices of the square – JLB Jun 27 '22 at 18:21
  • Actually, 4 and 4 only are enough and necessary. Indeed it is clear that your square will be defined by its symmetry. And the symmetry of a square are defined by the given values of the four corners. You can look here . mathonline.wikidot.com/the-group-of-symmetries-of-the-square. – EDX Jun 27 '22 at 18:21
  • 8
    @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. – Misha Lavrov Jun 27 '22 at 18:23
  • 1
    @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. – subrosar Jun 27 '22 at 18:24
  • 1
    @subrosar yes the points need not lie on the corners – JLB Jun 27 '22 at 18:24
  • 4 could define a square because of the symmetry of the square, but you'd need to put conditions on where the points are. For example, infinite points on the south and west edges of the square may not define the square. – user121330 Jun 27 '22 at 18:27
  • Actually for me the four corner points are needed, or 3 points and one rotation which is similar. The fact is that 3 isn't sufficient, 5 are too much. First example is a non-connex quadrilerion for the 3, 5 is too much as soon are no two points are on the same x or y coordinate in an ortho normalized plan. – EDX Jun 27 '22 at 18:35
  • 1
    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. – JMoravitz Jun 27 '22 at 18:37
  • 1
    @EDX the point is though that we aren't able to tell by looking at the points alone that those points were supposed to have been the corners. I interpret the question to be asking us whether if we were to look at $n$ points drawn by some other person who hasn't told us anything about the nature of those points beyond that they all belonged to the same square if there was any scenario in which we can unambiguously say what square it was and if so what the minimum $n$ is that would allow such unambiguity – JMoravitz Jun 27 '22 at 18:37
  • Yes, I see. The fact is that here we wonder how to reconstruct a square from points that are already supposed to be on a square. So for me the question to be asked is why is the underlying process that allow us to extend a kind of symmetry or if it isnt a symmetry, a kind of extension of for example 3 points to make a square. The fact is that if we admit we took point ok. – EDX Jun 27 '22 at 18:40
  • 1
    Yes, and given four points, if there happened to be a square where the points were all corners there also happens to be a square where the points are all midpoints and so such a configuration remains ambiguous. Similarly, three colinear points covering two corners and a third corner doesn't work since the edges could just be extended. How about three colinear points such that two were corners and a fourth point from the middle of the opposite edge? That could work... – JMoravitz Jun 27 '22 at 18:45
  • It is only on edges or also inside the square that you pick your points ? – EDX Jun 27 '22 at 18:46
  • @EDX Only on the boundary of the square – JLB Jun 27 '22 at 18:47
  • Ok so 3 on three random distinct edges are enough, 2 not enough – EDX Jun 27 '22 at 18:48
  • After reading the answers I'm wondering what is n for different types of triangles, or other polygons, but that would be a different question. – Daniel S. Fowler Jun 28 '22 at 07:32

4 Answers4

21

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.

JMoravitz
  • 79,518
10

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.

Misha Lavrov
  • 142,276
2

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.

Acccumulation
  • 12,210
  • 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 '22 at 07: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. – Acccumulation Jun 29 '22 at 00: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 '22 at 06: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. – FirstName LastName Jul 03 '22 at 22:30
-1

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.