The Diagonal Formula for Squares, Rectangles, Cubes & Polygons

Polygons are the shapes of our world. Computer and television screens, doors, and sheets of paper are all polygons. Diagonals of polygons are also useful. Learn how to instantly know how many diagonals any polygon can have by using this formula:

# of Diagonals = n(n - 3)2

Table of Contents

  1. What's a Simple Polygon?
  2. What's a Diagonal?
  3. Diagonal of a Polygon Formula
  4. How To Find The Diagonal of a Rectangle

What's a Simple Polygon?

A simple polygon is any two-dimensional (flat) shape made only with straight sides that close in a space, and with sides that do not cross each other (if they do, it is a complex polygon). A triangle is a polygon. A dart, kite, quadrilateral, and star are all polygons. Simple polygons can be concave or convex. The formula we will use works for all simple polygons.

What's a Diagonal?

A diagonal of a polygon is a line from a vertex to a non-adjacent vertex. So a triangle, the simplest polygon, has no diagonals. You cannot draw a line from one interior angle to any other interior angle that is not also a side of the triangle. A quadrilateral, the next-simplest, has two diagonals. A pentagon, whether regular or irregular, has five diagonals.

What is A Diagonal? - Definition

In convex, simple polygons, diagonals will always be within the interior. Consider a rectangular door. You can run a line from the top hinge corner to the bottom, opposite corner. You can also run a line from the bottom hinge corner up to the top, opposite corner. Those are the only two diagonals possible.

In concave, simple polygons, the diagonals may go outside the polygon, crossing sides and partly lying in the shape's exterior. They are still diagonals. Darts and stars are typical examples of concave polygons with diagonals outside their shapes.

Diagonals In Concave Polygons

Do not attempt to apply these concepts and our diagonal formula to complex polygons (polygons with self-intersecting lines).

Diagonals in Real Life

Diagonals in squares and rectangles add strength to construction, whether for a house wall, bridge, or tall building. You may see diagonal wires used to keep bridges steady. When houses are being built, look for diagonal braces that hold the walls straight and true.

Bookshelves and scaffolding are braced with diagonals. For a catcher in softball or baseball to throw out a runner at second base, the catcher throws along a diagonal from home plate to second.

The phone or computer screen you are viewing this lesson on is measured along its diagonal. A 21" screen never tells you the width and height; it is 21" from one corner to an opposite corner.

Diagonal of a Polygon Formula

To find all possible diagonals of a simple polygon with just a few sides, you can easily count them. When the polygon gets a bit complicated, counting them can be very hard.

Diagonal Formula For Square Rectangle and Cube

Fortunately, an easy formula exists to tell you exactly how many diagonals a polygon has. Remember that any vertex (corner) is connected by sides to two other vertices, so those connections cannot count as diagonals. That vertex cannot connect to itself, either. So for n sides, we will immediately reduce the possible number of diagonals by three.

We also do not want to count the same diagonal twice. Our door, for example, only has two diagonals; you do not count going from the top hinge to bottom opposite and back again. You will have to divide any answer by two.

Diagonal Formula

This leaves us with an elegant formula, where n is the number of sides (or vertices):

# of Diagonals = n(n - 3)2

How To Find The Diagonal of a Rectangle

Test this formula with something we know: diagonals of a rectangle. A rectangle has four sides and four vertices.

# of Diagonals = n(n - 3)2

= 4(4 - 3)2

= 4(1)2

= 42

= 2

Be skeptical! Try it for a pentagon (five sides):

How To Find The Diagonal

= 5(5 - 3)2

= 5(2)2

= 102

= 5

A pentagon has only five diagonals; our formula works.

Be really skeptical! Try it for a tetracontakaiheptagon, which is a ridiculously long (but correct) name for a 47-gon:

= 47(47 - 3)2

= 47(44)2

= 2,0682

= 1,034

Trust the formula. A 47-gon has 1,034 diagonals. This formula works every time to tell you exactly how many diagonals can be constructed inside (or outside) of any simple polygon, whether the shape is convex or concave.

Diagonal of a Rectangle Formula

For rectangles, l is the length of the rectangle, and b is the height of the rectangle.

Diagonal of a Rectangle = l2 + b2

Diagonal of a Square Formula

Now let's look at a few different diagonal formulas to find the length of a diagonal.

Diagonal of a Square = a2

Where a is the side of the square.

Diagonal of a Cube Formula

For a cube, we find the diagonal by using a three-dimensional version of the Pythagorean Theorem/distance formula:

Diagonal of a Cube = s2 + s2 + s2

Lesson Summary

You have learned a lot about particularly important parts of polygons, their diagonals. You now know how to identify the diagonals of any polygon, what some real-life examples of diagonals are, and how to use the formula, # of Diagonals = n(n - 3)2, where n is the number of sides (or vertices) of the polygon. Also, we briefly covered diagonal forumals to find the length of a diagonal in cubes squares, and rectangles.

Next Lesson:

How to Find the Perimeter of a Polygon

What you learned:

Once you go through the reading and multimedia of this lesson, you will learn to:

  • Identify diagonals of any simple polygon
  • Cite real-life examples of diagonals
  • Recall and use the formula for calculating the number of diagonals of a simple polygon
  • Discover the formulas for calculating the length of diagonals of squares, rectangles, cubes & polygons
Instructor: Malcolm M.
Malcolm has a Master's Degree in education and holds four teaching certificates. He has been a public school teacher for 27 years, including 15 years as a mathematics teacher.
Tutors online

20+ Math Tutors are available to help

Get better grades with tutoring from top-rated professional tutors. 1-to-1 tailored lessons, flexible scheduling. Get help fast. Want to see the math tutors near you?