Geometry
Vertex pairs minus sides
Every pair of vertices is either a side or a diagonal, so subtract the n boundary sides from the total number of pairs.
Last updated
The Formula
D = n(n - 1) / 2 - n
Every pair of vertices is either a side or a diagonal, so subtract the n boundary sides from the total number of pairs.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| n(n - 1) / 2 | All unordered vertex pairs | count | The number of ways to choose two vertices from n. |
| n | Boundary sides | count | One side for each vertex around the perimeter. |
| D | Total distinct diagonals | count | The pairs that remain once the sides are removed. |
What Each Symbol Means
n(n - 1) / 2count
All unordered vertex pairs
The number of ways to choose two vertices from n.
ncount
Boundary sides
One side for each vertex around the perimeter.
Dcount
Total distinct diagonals
The pairs that remain once the sides are removed.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate the number of diagonals in a polygon page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate The Number Of Diagonals In A Polygon, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Vertex pairs minus sides?
The formula for Vertex pairs minus sides is D = n(n - 1) / 2 - n. Every pair of vertices is either a side or a diagonal, so subtract the n boundary sides from the total number of pairs.
What does each symbol in Vertex pairs minus sides stand for?
n(n - 1) / 2 is all unordered vertex pairs; n is boundary sides; D is total distinct diagonals.
What units should I use with Vertex pairs minus sides?
Substitute n(n - 1) / 2 as a plain count, n as a plain count, D as a plain count. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Vertex pairs minus sides?
Subtracting two instead of three per vertex. A vertex cannot join to itself as well as to its two neighbours, so there are three exclusions, not two. Using n - 2 gives 48 divided by two for an octagon rather than the correct 20.