Mathwords logoMathwords

Diagonals of a Polygon — Definition, Formula & Examples

Diagonals of a polygon are line segments that connect two non-adjacent (non-neighboring) vertices of the polygon. Every polygon with four or more sides has at least one diagonal.

Given a polygon with nn vertices, a diagonal is a line segment joining any two vertices that do not share a common side. The total number of distinct diagonals in an nn-sided polygon is n(n3)2\frac{n(n-3)}{2}.

Key Formula

D=n(n3)2D = \frac{n(n - 3)}{2}
Where:
  • DD = Total number of diagonals in the polygon
  • nn = Number of sides (or vertices) of the polygon

How It Works

To find the number of diagonals in any polygon, use the formula n(n3)2\frac{n(n-3)}{2}, where nn is the number of sides. The reasoning behind this formula: each of the nn vertices can connect to n3n - 3 other vertices (you subtract the vertex itself and its two neighbors). This gives n(n3)n(n-3) connections, but since each diagonal is counted twice (once from each endpoint), you divide by 2. A triangle has zero diagonals because every vertex is adjacent to the other two.

Worked Example

Problem: How many diagonals does a hexagon (6-sided polygon) have?
Identify n: A hexagon has 6 sides, so n = 6.
n=6n = 6
Substitute into the formula: Plug n = 6 into the diagonal formula.
D=6(63)2D = \frac{6(6 - 3)}{2}
Simplify: Calculate the numerator, then divide by 2.
D=6×32=182=9D = \frac{6 \times 3}{2} = \frac{18}{2} = 9
Answer: A hexagon has 9 diagonals.

Another Example

Problem: How many diagonals does a decagon (10-sided polygon) have?
Identify n: A decagon has 10 sides.
n=10n = 10
Apply the formula: Substitute into the diagonal formula.
D=10(103)2=10×72D = \frac{10(10 - 3)}{2} = \frac{10 \times 7}{2}
Calculate: Multiply and divide.
D=702=35D = \frac{70}{2} = 35
Answer: A decagon has 35 diagonals.

Visualization

Why It Matters

Counting diagonals appears frequently in middle school and high school geometry courses, especially when studying polygon properties and interior structures. In more advanced settings, diagonals help triangulate polygons — a technique used in computer graphics to render complex shapes on screen. Understanding this formula also builds your skills in combinatorics, since the counting logic is the same used in many probability problems.

Common Mistakes

Mistake: Using n(n1)/2n(n-1)/2 instead of n(n3)/2n(n-3)/2
Correction: The expression n(n1)/2n(n-1)/2 counts all possible line segments between vertices, including the sides of the polygon. Diagonals exclude the nn sides, so you subtract 3 (the vertex itself plus its two neighbors) rather than 1.
Mistake: Forgetting to divide by 2
Correction: Each diagonal connects two vertices, so it gets counted once from each end. You must divide by 2 to avoid double-counting.

Related Terms

  • Diagonal of a PolygonDefines a single diagonal in detail
  • DecagonA 10-sided polygon with 35 diagonals
  • DodecagonA 12-sided polygon with 54 diagonals
  • HeptagonA 7-sided polygon with 14 diagonals
  • ConvexConvex polygons have all diagonals inside
  • ConcaveConcave polygons have some diagonals outside
  • ApothemAnother interior measurement of regular polygons