Diagonal of a Polygon Formula (original) (raw)

Last Updated : 23 Jul, 2025

Diagonals of a polygon are the lines that connect the alternate vertices of the polygon. A polygon of **n sides has **n(n-3)/2 diagonals. A polygon is a closed figure with n sides (where n is always greater than equal to 3). A polygon is a closed shape with three or more straight sides, and diagonals are the line segments that connect any two non-adjacent vertices of the polygon.

images-(7)

Diagonal of a Polygon

In this article, we'll explore the concept of diagonals in polygons, examine their properties and patterns, and discuss their applications in various fields. So, let's get started and dive into the exciting world of polygons and diagonals!

Table of Content

What are Polygons?

Polygon can be defined as a closed figure which is formed by joining the straight lines. So it is easy to see that to make a polygon at least three lines are needed. There are polygons known with different names depending on the number of lines by which it is formed. Some basic polygons are:

Definition of Diagonals

The diagonal of a polygon can be defined as a line that joins the end of two non-adjacent vertices of any polygon and it is generally inside a polygon for convex polygons and lies outside for concave polygons.

Read More about **Diagonal.

Number of Diagonals in a Polygon

As we know there are different polygons with each having a different number of sides, such as a triangle with three sides, quadrilateral with 4 sides, a pentagon with five sides, etc., and each polygon has a different number of diagonals.

Formula for Diagonal of Polygon

The formula for the number of diagonals of a polygon is given as follows:

**Diagonals = (n × (n - 3))/2

Where **n is the number of sides of a polygon

**Proof:

For making a diagonal in a polygon we need two vertices. Let's consider an N-sided polygon, now each vertex can be connected to the other in nC2 different ways but in this, the number of sides which is n is taken twice so subtract n from the total number of ways.

Hence number of diagonals = nC2 - n

= (n!)/(n - 2)! × (2!) - n

= n(n - 1)(n - 2)!/(n - 2)! × (2!) - n

= n(n - 1)/2 - n

= (n(n - 1) - 2n)/2

= n(n - 3)/2

Diagonal of a Polygon: Summary

A polygon is a two-dimensional geometric figure with straight sides. When discussing the diagonals of a polygon, we refer to the line segments that connect non-adjacent vertices. Calculating the number of diagonals in a polygon is an interesting problem in combinatorial geometry.

Examples of Calculating the Number of Diagonals in a Polygon

**Example 1: How many diagonals does a Triangle have?

**Solution:

Diagonal of Triangle

As triangle has 3 sides.

So, for triangle n = 3

Using the formula, diagonals = (n × (n - 3))/2

Diagonals = (3 × (3 - 3))/2

⇒ Diagonals = 0

**Hence, a triangle has zero diagonals.

**Example 2: Find the number of diagonals of a Square or any other quadrilateral.

**Solution:

Diagonals of Square

As Square or any other quadrilateral has 4 sides.

So, for square n = 4

Using formula, diagonals = (n×(n-3))/2

Put n = 4

Diagonals = (4 × (4 - 3))/2

⇒ Diagonals = 2

**Hence, a square or any other quadrilateral has two diagonals.

**Example 3: How many diagonals does a Pentagon have?

**Solution:

Diagonal of Pentagon

As a pentagon has 5 sides.

So, for pentagon n = 5

Using the formula, diagonals = (n × (n - 3))/2

Put n = 5

Diagonals = (5 × (5 - 3))/2

⇒ Diagonals = 5

**Hence, a pentagon has five diagonals.

Properties for Diagonals of a Polygon

There are various properties diagonals are associated with for various different polygons such as different types of quadrilaterals and regular polygons. Some of polygons with various different properties of diagonals are:

**For Square

**For Parallelogram

**For Rhombus

**For Regular Polygon

Diagonals in Convex and Concave Polygons

Convex and concave polygons are defined based on the position of diagonals. If all the diagonals of a polygon lie inside of the area bounded by its side, then it is called a convex polygon whereas if any one of the diagonals of a polygon lies outside of the area bounded by its side, then it is called a concave polygon.

 Convex and Concave Polygons

One another definition of Convex and Concave Polygons includes interior angles. If all internal angles of a polygon are strictly less than 180° then it is called a **convex polygon while if any of the interior angles is strictly greater than 180° then it is called a **concave polygon.

Lengths of Diagonals in Regular Polygons

As regular polygons equal sides and interior angles, we can find the formula for the length of regular polygons. The formula for the length of the diagonal of a regular polygon is given as:

\bold{d = s \sqrt{2(1- cos(360°/n))}}

Where,

**Read More,

Sample Problems on Diagonals of a Polygon

**Problem 1: How many diagonals does a hexagon have, find using the diagonal of a polygon formula.

**Solution:

Diagonal of Hexagon

Hexagon is a polygon that is formed by six straight lines

So a hexagon has 6 sides so n = 6

Using formula, diagonals = (n × (n - 3))/2

Put n = 6

Diagonals = (6 × (6 - 3))/2

⇒ Diagonals = 9

Hence a hexagon has nine diagonals.

**Problem 2: There are 20 diagonals in a polygon, find the number of sides it has.

**Solution:

Using diagonals formula = (n × (n - 3))/2

So 20 = (n × (n - 3))/2

⇒ 20 × 2 = (n × (n - 3))

⇒ 40 = n2 - 3 × n

⇒ n2 - 3 × n - 40 = 0

⇒ n2 - 8n + 5n - 40 =0

⇒ n(n - 8) + 5(n- 8) = 0

⇒ (n - 8)(n + 5) = 0

So, n = 8

**Hence the polygon is the octagon (polygon with 8 sides).

Diagonal of Octagon

**Problem 3: How many diagonals do a decagon has, find using the diagonal of a polygon formula.

**Solution:

A decagon has 10 sides so n = 10

Using formula, diagonals = (n × (n - 3))/2

Put n = 10

Diagonals = (10 × (10 - 3))/2

= 35

Hence a decagon has 35 diagonals.

**Problem 4: There are 27 diagonals in a polygon, find the number of sides it has.

**Solution:

Using diagonals formula = (n × (n - 3))/2

So 27 = (n × (n - 3))/2

⇒ 27 × 2 = (n × (n - 3))

⇒ 54 = n2 - 3 × n

⇒ n2 - 3 × n - 54 = 0

⇒ n2 - 9n + 6n - 54 =0

⇒ n(n - 9) + 6(n- 9) = 0

⇒ (n - 9)(n + 6) = 0

So, n = 9

**Hence the polygon is Nonagon (polygon with 9 sides).

**Problem 5: How many diagonals does a polygon have if the sides are 20?

**Solution:

Put n = 20 in diagonals formula

Diagonals = (20 × (20 - 3))/2

⇒ Diagonals = 170

**Hence there will be 170 diagonals in a 20 sided polygon.

**Problem 6: There are 405 diagonals in a polygon, find the number of sides it has.

**Solution:

Using diagonals formula = (n × (n - 3))/2

So 405 = (n × (n - 3))/2

⇒ 405 × 2 = (n × (n - 3))

⇒ 810 = n2 - 3 × n

⇒ n2 - 3 × n - 810 = 0

⇒ n2 - 30n + 27n - 810 =0

⇒ n(n - 30) + 27(n - 30) = 0

⇒ (n - 30)(n + 27) = 0

So, n = 30

**Hence the polygon has 30 sides.

**Problem 7: How many diagonals does a polygon have if the sides are 40?

**Solution:

Put n = 40 in diagonals formula

Diagonals = (40 × (40 - 3))/2

⇒ Diagonals = 740

**Hence, there will be 740 diagonals in a 40 sided polygon.

**Problem 8: A Polygon with 7 Sides Find the number of diagonals in a heptagon (7-sided polygon).

**Solution:

Using the formula

n×(n-3)×2

Put n = 7

D = 7(7-3)×2

= 7×4×2

=14

**Hence the number of diagonals in a heptagon is 14.

Practice Problems on **Diagonal of a Polygon Formula

**1. Number of Diagonals in a Hexagon Calculate the number of diagonals in a hexagon (6-sided polygon).

**2. Number of Diagonals in an Octagon Calculate the number of diagonals in an octagon (8-sided polygon).

**3. Determine the Number of Diagonals in a Polygon with 12 Sides Calculate the number of diagonals in a polygon with 12 sides.

**4. If a Polygon has 35 Diagonals, How Many Sides Does it Have? Determine the number of sides in a polygon that has 35 diagonals.

**5. A Polygon with 7 Sides Find the number of diagonals in a heptagon (7-sided polygon).

**6. Number of Diagonals in a Decagon Calculate the number of diagonals in a decagon (10-sided polygon).

**7. Determine the Number of Sides for 44 Diagonals Find out how many sides a polygon has if it contains 44 diagonals.

**8. Number of Diagonals in a Nonagon Calculate the number of diagonals in a nonagon (9-sided polygon).

**9. Polygon with 20 Sides Determine the number of diagonals in a polygon with 20 sides.

**10. Number of Diagonals in a Dodecagon Calculate the number of diagonals in a dodecagon (12-sided polygon).