If we are in the outdoor area of a bar and our table is wobbly, a possible solution is to take a piece of paper, fold it and stick it under one of the legs. This solution, however, is not definitive: after some time, the paper will compress and the table will wobble again. We can then try a more elegant and mathematical solution: rotate the table. It seems incredible, but if we have a square coffee table with four legs positioned on a uneven floor (but not too much)mathematics guarantees us that by rotating the table slightly we will be able to find a position in which all four legs rest on the ground, thus making the table stable.
Let’s see better how to do it and what the theorem on which this property depends is.
Because the table wobbles
A table with four equal legs is, in theory, stable. But this only applies if the floor is perfectly flat. In reality, it often happens to be found on irregular surfaces: a pavement, a terrace, the pavé of a square. In these cases, three table legs may rest on the ground, but one remains raised, causing instability.
Who seriously posed the problem of how to prevent his table from wobbling was, among others, André Martinphysicist at CERN. Martin worked extensively on particle physics but also loved to think about lighter topics (such as the stability of coffee tables). He had noticed that the tables on the terrace of the CERN canteen, although perfectly intact, often wobbled due to the uneven ground. Studying the problem from a mathematical point of view, Martin demonstrated that if the ground does not present exaggerated slopes (greater than 15 degrees)there is always an angle of rotation where all four legs touch the ground. And it works in practice too: Martin says he personally tested it many times, rotating the terrace tables until he found the right position.
How to rotate the coffee table the right way
As we said, the table is only stable if all four legs touch the ground at the same time. If we find ourselves in front of an unstable table, therefore, we must place a hand on it to make sure that three of the four legs touch the ground and remain adherent to the ground and then slowly rotate the tableuntil the fourth also finds its foothold.
During this rotation it is important to try to keep the center of the table still (indicated by the red dot in the figure), so as not to change the position of the three legs already in contact. It doesn’t matter which direction you turn it, and you don’t need to turn it a lot: it’s enough maximum 90 degrees. If the ground is not excessively uneven, mathematics assures us that there is at least one position where the table will stop wobbling.

But be careful: this it doesn’t mean that the plane will be perfectly horizontal or “on the level”, but simply that it will no longer move when we lean on something.
Why it works: the explanation
To understand the mathematics behind this trick, let’s imagine a terrain with three raised humpson which legs 2, 3 and 4 and one rest part flatabove which leg 1 is suspended. Our table, at this moment, is completely horizontal, but it is also completely unstable: if we place something on it, everything will collapse.

Now we rotate the table slowly of 90 degreespivoting on the center and keeping legs 2, 3 and 4 firmly glued to the ground. During rotation:
- Leg 2, which starts from the hump at the bottom right, goes down to the floor and then goes back up.
- Leg 3, starting from the top hump, does the same.
- Leg 4, which starts from the hump at the bottom left, descends and stops on the plane, lower than where it started.
- There leg 1the one initially suspended, it lowers following the movement of the others during the rotation and rotating it encounters the hump on the right. At this point, to continue rotating, it would like to be able to go up again, but it cannot do so: leg 4, in fact, is already resting on a lower area, and the table (being rigid) cannot bend or deform to allow leg 1 to go up. To be able to continue the rotation up to 90 degrees, therefore, leg 1 must dig a hole inside the hump and slip below ground level.
Let’s stop for a moment and observe how leg 1 moved as we rotated the table. At the start was above the ground level, without touching it: the distance it was therefore between the leg and the ground positive. At the end of the rotation, however, the leg would be below the ground level: in that case the distance would be negative.
Of course, our goal is not to make the leg sink into the ground, but to find the moment when all four legs are resting on the ground. In other words, we look for the instant when the distance between leg 1 and the ground is exactly zero.
If we represent this distance with a graph while the table rotates, we get a curve that starts from a positive value and ends up at a negative value, more or less like this:

As the graph shows, there is necessarily a point where the distance becomes zero. This is no coincidence: it is a direct consequence of a famous mathematical result, the intermediate value theorem. The theorem states that:
If a continuous function takes on a positive value at one point and a negative value at another, then somewhere between the two it must be zero.
Applied to our problem, this means that, by rotating a square table and keeping three legs always in contact with the ground, there is definitely a position in which the distance between the fourth leg and the ground will also be zero and will touch the ground. At that moment the table will be stable, try it to believe it.
