4
$\begingroup$

Is there a closed-form expression to compute the length of an arbitrary diagonal of a regular unit $n$-gon?

$\endgroup$
4
+50
$\begingroup$

For the $k$th diagonal of a polygon that's inscribed in a unit circle, the length is $$ \sqrt{ (\cos(\frac{2\pi k }{n}) - 1)^2 + \sin(\frac{2\pi k }{n})^2 }. $$

You can sanity-check this by seeing that for $k = 0$, it gives the answer $0$, and for even $n$ and $k = n/2$, you get $2$, which is correct because that diagonal is a diameter of the circumcircle of the $n$-gon.

You can also slightly simplify; \begin{align} $$ L_k &=\sqrt{ (\cos(\frac{2\pi k }{n}) - 1)^2 + \sin(\frac{2\pi k }{n})^2 }\\ &=\sqrt{ \cos^2(\frac{2\pi k }{n}) - 2 \cos(\frac{2\pi k }{n}) + 1 + \sin(\frac{2\pi k }{n})^2}\\ &=\sqrt{ \cos^2(\frac{2\pi k }{n}) + \sin^2(\frac{2\pi k }{n}) - 2 \cos(\frac{2\pi k }{n}) + 1} \\ &=\sqrt{ 1 - 2 \cos(\frac{2\pi k }{n}) + 1} \\ &=\sqrt{ 2 - 2 \cos(\frac{2\pi k }{n})} \end{align}

The reason?

  1. A point at angle $u$ around the circle from $(1, 0)$ (measuring counterclockwise) has coordinates $(\cos u, \sin u)$, by basic trig.

  2. The points of an $n$-gon are at angles $0, \frac{2\pi}{n}, 2\frac{2\pi}{n}, \ldots, (n-1) \frac{2\pi}{n}$, because the $n$ vertices divide the $2\pi$ total angle of the circle into $n$ equal pieces, each of size $\frac{2\pi}{n}$.

  3. The $0$th point -- the start --- is at $(\cos 0, \sin 0) = (1, 0)$.

  4. The $k$th point is at $(\cos( k\frac{2\pi}{n}), \sin( k\frac{2\pi}{n}))$, using items 1 and 2.

  5. The distance between points $(a, b)$ and $(x, y)$ is $\sqrt{(a-x)^2 + (b-y)^2}$; that's the standard distance formula in the plane.

  6. Applying this to $(a, b) = (\cos( k\frac{2\pi}{n}), \sin( k\frac{2\pi}{n}))$ and $(x, y) = (1, 0)$ gives the formula I wrote down.

$\endgroup$
  • $\begingroup$ why is this? Can you give me a step by step proof? $\endgroup$ – William Grannis Feb 13 '18 at 15:34
  • $\begingroup$ See revised answer, which includes an explanation. $\endgroup$ – John Hughes Feb 13 '18 at 16:31
4
$\begingroup$

The length of the $k$-th diagonal is

$$d_k = 2\sin(k \pi/n) \quad \text{ for } k \le n/2.$$

You can check via trig identities that this does agree with the answer of G Cab and John Hughes.

First explanation for the formula: you want the length of a chord subtending a central angle of $2\pi k/n$. You can place the chord anywhere you want on the circle. So you might as well place it with endpoints at $(\cos k \pi/n, \sin k \pi/n)$ and $(\cos k \pi/n, -\sin k \pi/n)$, so the chord is vertical. Then the length of the chord is the difference in $y$-coordinates.

Second explanation for the formula:

Read the post of G Cab up the the point where one obtains $$ d_k = |e^{i k 2 \pi /n} - 1|, $$ where it suffices to consider $k \le n/2$ by symmetry of the n-gon. Now we are going to let the complex numbers take care of the trigonometry and distance formulas. I'll write the computation, and then give some details:

$$d_k = |e^{i k 2 \pi /n} - 1| = |e^{i k \pi /n} - e^{-i k \pi /n}| = 2 \sin(k \pi/n)$$ for $k \le n/2.$

In the first step, we use that for $t$ real, $|e^{-it}| = 1$. So $$|e^{i2t} -1| = |e^{-it}| |e^{i2t} -1| = |e^{-it}(e^{i2t} -1)| = |e^{it} - e^{-it}|. $$ Now $$ e^{it} - e^{-it} = (\cos t + i \sin t) - (\cos t - i \sin t) = 2i \sin t. $$ So $$ |e^{it} - e^{-it} | = |2i \sin t| = |2 \sin t| = 2 \sin t, $$ if $0 \le t \le \pi/2$.

$\endgroup$
  • $\begingroup$ lean (+1): can be easily derived from other formula by applying angle-duplication $\endgroup$ – G Cab Feb 14 '18 at 16:57
1
$\begingroup$

The vertices of a regular n_agon, inscribed in a circle of radius $1$, represented in the complex plane will be $$ e^{\,i\,{{2k\pi } \over n}} \quad \left| {\;0 \le k \le n - 1} \right. $$

If we take the difference with the point at $(1+i0)$, i.e. the one with $k=0$, we get all possible diagonals $$ d_{\,k} = e^{\,i\,{{2k\pi } \over n}} - 1\quad \left| {\;1 \le k \le n - 1} \right. $$

Concerning their length, then $$ \eqalign{ & \left| {d_{\,k} } \right| = \left| {e^{\,i\,{{2k\pi } \over n}} - 1} \right| = \sqrt {\left( {1 - \cos \left( {{{2k\pi } \over n}} \right)} \right)^2 + \sin ^2 \left( {{{2k\pi } \over n}} \right)} = \cr & = \sqrt {2\left( {1 - \cos \left( {{{2k\pi } \over n}} \right)} \right)} \cr} $$ which is of course symmetric around $k=n/2$.

$\endgroup$
-2
$\begingroup$

You can do it incrementally by drawing all diagonals from a fixed vertex and using the law of cosines starting at the outer triangle and moving to the inner ones.

$\endgroup$
  • $\begingroup$ I'm looking for a solution in closed form. I've found expressions for 1st and 2nd diagonal, but that is not as useful to me as a closed expression. $\endgroup$ – William Grannis Feb 2 '18 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.