Why are four-legged chairs so common?
Suppose the leg spacing for a square and triangular chair is the same then the positions of the legs look like:
If we call the leg spacing $2d$ then for the square chair the distance from the centre to the edge is $d$ while for the triangular chair it's $d\tan 30^\circ$ or about $0.58d$. That means on the triangular chair you can only lean half as far before you fall over, so it is much less stable. To get the same stability as the square chair you'd need to increase the leg spacing to $2/\tan 30^\circ d$ or about $3.5d$ which would make the chair too big.
A pentagonal chair would be even more stable, and a hexagonal chair more stable still, and so on. However increasing the number of legs gives diminishing increases in stability and costs more. Four-legged chairs have emerged (from several millennia of people falling off chairs) as a good compromise.
The real question is why not 2 legged chairs?
First, our legs are single points that contact the floor. How they reach the floor is not important.
If you have $n$ legs evenly spaced, then the ratio between the radius of the legs and the length of the shortest axis is $\cos(\pi/n)$:
- 2 legs: 0
- 3 legs: 0.5
- 4 legs: ~0.71
- 5 legs: ~0.81
- 6 legs: ~0.87
- 7 legs: ~0.90
- 8 legs: ~0.92
So for a given chair radius/diameter, your ability to tip the chair is measured by the above value. A lower value means it is easier to tip the chair along its "tippy directions".
- 0 legged chairs are known as sitting on the floor.
- 1 legged chairs don't even have a non-tippy direction. They are apparently used when milking cows.
- For a 2 legged chair, it is infinitely tippy along its tippy direction. So clearly that is a bad plan. You can balance by using your legs as a 3rd/4th leg.
- A 3 legged chair has half the stability along its tippy directions as it does along its long direction -- towards a "face" as opposed to a "corner". You can "splay" the legs to make up for it, or accept low stability.
- A 4 legged chair has 71% of the stability towards its tippy direction.
- A 5 legged chair has 81% tippy stability. As an example, rolling office chairs.
The return on additional leg for a 3 legged chair is infinite. For a 4 legged chair, the chair is 41% more stable along the tippy direction than a 3 legged chair. For a 5 legged chair, the chair is ~14% more stable along its tippy direction. (For a fixed radius)
Adding that 4th leg adds a whole bunch of stability. Adding a 5th leg only adds a small amount (1/3 as much). In fact, in order to get the same stability increase from 3 to 4 after you have 4 legs, you need an infinite number of legs (a solid circle or ring of legs).
So 4 legs is the sweet spot between 0 and O.
Five legged chairs are common too.
Sometime in the 1980s a lot of office chairs were replaced - on the grounds that four-legged swivel chairs became quite unstable when the tilting/reclining feature shifted the centre of gravity.
One reference I've found is this, which mentions an Australian safety standard from 1990 I'm pretty sure the mass replacement I described was due to a similar incoming standard in the UK but can't find links at the moment.
Since then, virtually all swivel chairs that I've seen have had five legs.