# Number Diagonals of Polygon

One of the easiest topics in plain Geometry is to count the number of diagonals in a convex polygon. You might familiar already or even memorized the said formula. So let me show you the technique how to derive it. This tutorial is made with two main reasons. First is to educate and second is to teach my own technique in derivation.

We will present two derivations, using plain geometry and common sense and the second way is using Combinatorics technique and again a small common sense.

Derivation:

By Plane Geometry:

Consider the figure above of a convex heptagon. Each point can make 4 diagonals. Only four diagonals because we can’t consider the segment made by connecting point A to B and point A to C. Since there are 7 points, there must be 7×4=28 diagonals are there in heptagon.

But, try to draw the diagonals starting from point E like shown below. We can basically draw again 4 diagonals but there is 1 common diagonal connecting A to E and E to A which should be counted only once. Doing the same process, we were able to figure out that each point has 1 common diagonal that should be counted once. Since we already calculated the number of diagonals previously, we can eliminate the error of counting one diagonal twice by dividing the final answer by 2. So instead of 28, the number of diagonals that can be drawn in convex heptagon is 14.

For n-gon:

Now, consider a convex n-gon. Since a heptagon has 7 sides and 7 vertices, n-gon also has n number of vertices. Now each point of n-gon can make n-3 diagonals. That is because the segments connecting the point and the point right beside it can’t be considered as diagonal.

So there must be $n(n-3)$ diagonals that can be drawn from n-gon however remember that we counted each diagonal twice. By dividing $n(n-3)$ by 2 we can eliminate counting errors. Thus the formula for taking the maximum number of diagonals from convex n-gon is $d=\displaystyle\frac{n(n-3)}{2}$

Derivation using basic Combinatorics with small common sense:

Consider a convex polygon like the figure shown below. Removing the segments connecting the points we have the figure in 2, a scattered points.

In Combinatorics, we can connect the points in nC2 ways from n number of points. But we also need to subtract the outermost segment that  we took out from figure 1 and the rest must be the number of diagonals. That is where the small common sense can be used.

Expressing that in equation we have, $d=nC2-n$ $d=\displaystyle\frac{n!}{(n-2)!2!}-n$ $d=\displaystyle\frac{n(n-1)(n-2)!}{(n-2)!2!}-n$ $d=\displaystyle\frac{n(n-1)}{2}-n$ $d=\displaystyle\frac{n(n-1)-2n}{2}$ $d=\displaystyle\frac{n^2-n-2n}{2}$ $d=\displaystyle\frac{n^2-3n}{2}$ $d=\displaystyle\frac{n(n-3)}{2}$

I hope you learned something from that. 😀