So I wonder if there is a formula so that when there's a defined edge length, I can calculate a regular polygon's edges amount by knowing its length from corner to center, or vice versa.

So let's say our defined edge length is 1, then by knowing the length from corner to center is $\frac{\sqrt2}{2}$, I knows it's a square. And if the length is one, I know it's a hexagon.

  • 1
    $\begingroup$ Note that if we join the center to two adjacent vertices of the polygon, we get an isosceles triangle with sides $l$, $r$ and $r$ where $l$ is side length and $r$ is the radius. $\endgroup$
    – Faiq Irfan
    Jan 22, 2019 at 14:34

2 Answers 2


Yes. The quantity you are referring to is the radius of the polygon, and it has the formula $$r=\frac{s}{2\sin\left(\frac{180}{n}\right)}$$ where $s$ is the side length of the polygon and $n$ is the number of sides. So given $r$ and $s$, you can simply solve the above equation for $n$.

  • 1
    $\begingroup$ This is correct as far as it goes. It's worth pointing out that when you solve for $n$ there's no guarantee that it will turn out to be an integer, and hence correspond to a regular polygon. $\endgroup$ Jan 22, 2019 at 14:35
  • 6
    $\begingroup$ That's right. But if the given radius is indeed the radius of some regular polygon, then the solution $n$ will be an integer. $\endgroup$
    – kccu
    Jan 22, 2019 at 15:48
  • 13
    $\begingroup$ Good answer. A minor nitpick: $\sin(180^{\color{blue}{\circ{}}} / n)$ $\endgroup$
    – user332714
    Jan 23, 2019 at 0:09

Yes, and here is the logic of it.

To show how, I've drawn a square, pentagon and hexagon.

In each case, I've drawn the same construction lines - a circle that touches all their corners (we can do this with any regular polygon). I've labelled the length of the "defined edge" as $s$ and the length from corner to centre as $r$. I'm going to call the number of sides, $n$.

I've also marked a grey line that bisects the edge, from the centre. Because of the way I've positioned the line, it is a perpendicular bisector of the edge (crosses it at a right angle) so each half is a right angle triangle. The right angle triangle has one side $r$, and one side $s\big/2$, and I've labelled the angle these make at the centre, $A$.

Basic trigonometry says that for the right angle triangles, $$\begin{align} \sin (A) &= \frac{\left[\dfrac s2\right]}r = \frac s{2r}\\ A &= sin^{-1} \left(\frac s{2r}\right) \end{align}$$

But we also know that each edge, "takes up" $2\times A$ degrees, and so $n$ sides will "take up" $2\times A\times n$ degrees. But all $n$ sides must take up 360 degrees, the number of degrees at the centre. So $2\cdot A\cdot n = 360$.

Now we can solve the problem

Since $$\begin{align} 2An &= 360\\ An &= 180\\ \sin^{-1}\left(\frac s{2r}\right)\cdot n &= 180\\ n &= \frac{180}{\sin^{-1}\left(\dfrac s{2r}\right)} \end{align}$$

Testing this with your square:

$s=1, r=\frac{\sqrt2}{2}$

$$\implies n = \frac{180}{\sin^{-1}\left(\dfrac{1}{2\cdot\dfrac{\sqrt2}{2}}\right)} = \frac{180}{45} = 4$$

So your example object was a square (4 sides).

Testing this with your hexagon:

$s=1, r=1$

$$\implies n = \frac{180}{\sin^{-1}\left(\dfrac{1}{2\cdot1}\right)} = \frac{180}{30} = 6$$

So your example object was a hexagon (6 sides).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .