While teaching a secondary school student stochastic I found that the sum $$\sum\limits_{n=1}^N(n-2)$$ is equal to the formula used to calculate the number of diagonals in a polygon with N sides: $$\frac{N(N-3)}{2}$$ Can anyone explain why this is the case or formulate a proof?
Alternative formula for number of diagonals in a polygon?
519 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
$\sum\limits_{n=1}^N(n-2)$ is the sum of $N$ consecutive terms of an arithmetic sequence with common difference $1$.
By the well-known formula on arithmetic sequences, it is therefore equal to the arithmetic mean of the first and last terms, times the number of terms. In formula $$\sum_{n=1}^N(n-2)=\frac{-1+(N-2)}2\times N=\frac{N(N-3)}2.$$
On
Here is a combinatorial argument:
For $\frac{N(N-3)}{2}$: We can have $N-3$ diagonals from each vertex of the $N$-gon and there are $N$ vertices. But $N(N-3)$ double counts all the diagonals so we divide it by $2$.
For $\sum\limits_{n=1}^N(n-2)$: First of all, we have
$$\sum\limits_{n=1}^N(n-2) = \sum\limits_{n=3}^{N-1}(n-1)$$
since a polygon needs to have at least $3$ vertices. Now, we start from $N=3$ vertices with $0$ diagonals and add another vertex. If we draw lines from new vertex to all $4$ vertices, $2$ of the vertices are adjacent to new vertex so they are not forming diagonals. Therefore, $3-2$ of these lines are diagonals. But since we draw lines to all $3$ vertices, one of the edges of triangle will also turn to a diagonal. Therefore, we have $3-2+1 = 2$ diagonals in addition to our $0$ diagonals from the beginning. Below is the visual explanation for $N = 5$ from a quadrilateral:
Here, red vertex is the new vertex, red lines are the lines that we draw from new vertex to all other vertices and blue line is the line that becomes a diagonal after drawing all the lines from the new vertex to other vertices.
You can continue this process to see that whenever we add a vertex (without breaking convexity) and all the lines from that vertex to other $n$ vertices, we add $n-2+1 = n-1$ diagonals to number of diagonals of $n$-gon. In general, in order to count the number of diagonals of $N$-gon, we recursively use the above algorithm from $n=3$ (smallest polygon) to $N-1$ (polygon that we add the $N^{th}$ vertex to).
Just to clarify, if we let $x_n$ be the number of diagonals of $n$-gon, we have $$x_{n+1}=x_n+n-1$$ where $x \ge 3$ and $x_3 = 0$. This is the recursive formula for the number of diagonals of an $n$-gon.

We have $$\sum_{n=1}^N (n-2)=(\sum_{n=1}^N n) - 2N = \frac{N(N+1)}{2}-2N=\frac{N^2-3N}{2}=\frac{N(N-3)}{2}$$