What is Diagonal — Definition, Formula & Examples in Math

#Math Terms
TL;DR
A diagonal is a straight line segment that joins two non-adjacent (non-consecutive) vertices of a polygon or polyhedron. This article gives the formal definition, the count formula $n(n-3)/2$, length formulas for the square ($a\sqrt{2}$), rectangle ($\sqrt{l^2 + b^2}$), and cube ($a\sqrt{3}$), three worked examples (Quick / Standard / Stretch), the properties of diagonals across common quadrilaterals, and the most common mistakes.
BT
Bhanzu TeamLast updated on June 4, 20267 min read

A diagonal is a line segment that connects two corners of a shape without sliding along any edge. A triangle has none — every pair of vertices is already joined by an edge. A square has two. A pentagon has five.

The Formal Definition

A diagonal of a polygon is a line segment joining two non-adjacent (non-consecutive) vertices. In a polyhedron (a 3D solid), a space diagonal joins two non-adjacent vertices that do not share a face; a face diagonal lies inside a single face of the solid.

The smallest polygon that can have a diagonal is the quadrilateral — three-sided polygons (triangles) have only neighbouring vertices.

Quick reference.

  • Definition: a segment joining two non-adjacent vertices.

  • Notation: $d$ for length; sometimes $AC$ or $BD$ naming the vertices.

  • Count for an $n$-sided polygon: $\dfrac{n(n-3)}{2}$.

  • Length — square (side $a$): $a\sqrt{2}$.

  • Length — rectangle ($l, b$): $\sqrt{l^{2} + b^{2}}$.

  • Length — cube (side $a$): $a\sqrt{3}$ (space diagonal).

  • Grade introduced: CCSS-M 4.G.A (polygon properties); NCERT Class 8 — Understanding Quadrilaterals.

The Count Formula — Why $\dfrac{n(n-3)}{2}$

From any one vertex, you can draw a line to every other vertex except two — yourself and your two immediate neighbours (those connect by edges, not diagonals). That gives $n - 3$ diagonals per vertex. With $n$ vertices, the total count of vertex-to-diagonal pairs is $n(n - 3)$. But each diagonal has two endpoints, so it's been counted twice — divide by $2$.

$$\text{Number of diagonals} = \frac{n(n-3)}{2}.$$

Polygon

$n$

Diagonals

Triangle

$3$

$0$

Quadrilateral

$4$

$2$

Pentagon

$5$

$5$

Hexagon

$6$

$9$

Heptagon

$7$

$14$

Octagon

$8$

$20$

Decagon

$10$

$35$

The count grows quickly because each new side adds connections to roughly all existing vertices.

Length of a Diagonal — The Three Most-Used Formulas

These three come up most often in CBSE and Common Core problems.

Square (side $a$). The diagonal cuts the square into two right triangles whose legs are both $a$. By the Pythagorean theorem:

$$d = \sqrt{a^{2} + a^{2}} = a\sqrt{2}.$$

Rectangle ($l, b$). The diagonal is the hypotenuse of a right triangle with legs $l$ and $b$:

$$d = \sqrt{l^{2} + b^{2}}.$$

Cube (side $a$). The space diagonal runs from one corner of the cube straight through to the opposite corner. It's the hypotenuse of a right triangle whose legs are $a$ (one edge) and $a\sqrt{2}$ (the face diagonal):

$$d = \sqrt{a^{2} + (a\sqrt{2})^{2}} = \sqrt{a^{2} + 2a^{2}} = a\sqrt{3}.$$

A pattern emerges: a square's diagonal grows like $\sqrt{2}$, a cube's like $\sqrt{3}$, a 4D-hypercube's like $\sqrt{4} = 2$, and so on. The $\sqrt{n}$-growth is one of the cleanest results in elementary geometry.

Diagonal Properties Across Common Quadrilaterals

The diagonals of a quadrilateral carry rich information about the shape.

Quadrilateral

Diagonals equal?

Bisect each other?

Bisect at right angles?

Square

Rectangle

Rhombus

Parallelogram

Trapezium (general)

Isosceles trapezium

Kite

One bisects the other

These properties are how a geometry student proves what kind of quadrilateral they're looking at — measure the diagonals, check the three boxes above, identify the shape.

Three Worked Examples — Quick, Standard, Stretch

Quick. How many diagonals does a hexagon have?

Use $\dfrac{n(n-3)}{2}$ with $n = 6$:

$$\frac{6 \times (6 - 3)}{2} = \frac{6 \times 3}{2} = 9.$$

Final answer: $9$ diagonals.

Standard (Wrong Path First — Where Diagonals Trip Students). A rectangle has length $24$ cm and breadth $7$ cm. Find the length of its diagonal.

The wrong path. A student tries to add: $d = l + b = 24 + 7 = 31$ cm.

The flaw: the diagonal is not the sum of the sides. It's the straight-line distance across, which is the hypotenuse of a right triangle. Adding $l$ and $b$ would only work if the rectangle were collapsed flat — which makes no geometric sense.

The rescue. Use the Pythagorean theorem on the right triangle whose legs are $l$ and $b$:

$$d = \sqrt{l^{2} + b^{2}} = \sqrt{24^{2} + 7^{2}} = \sqrt{576 + 49} = \sqrt{625} = 25 \text{ cm}.$$

Final answer: $25$ cm.

Sanity check: the diagonal should be less than $l + b = 31$ (triangle inequality) and greater than $l = 24$ (the diagonal is the longest side of the right triangle). $24 < 25 < 31$ ✓.

The lesson — a diagonal is a Pythagorean hypotenuse, not a sum. The right angle at the corner of the rectangle is the whole geometric reason behind the $\sqrt{l^{2} + b^{2}}$ formula.

Stretch. A cube has edge length $6$ cm. Find (a) the face diagonal and (b) the space diagonal.

(a) Face diagonal — diagonal of one square face of side $6$:

$$d_{\text{face}} = 6\sqrt{2} \approx 8.49 \text{ cm}.$$

(b) Space diagonal — corner to opposite corner through the interior:

$$d_{\text{space}} = 6\sqrt{3} \approx 10.39 \text{ cm}.$$

Final answer: face diagonal $\approx 8.49$ cm; space diagonal $\approx 10.39$ cm.

This is the version of diagonal that shows up in NCERT Class 9–10 mensuration problems and in 3D coordinate geometry (the distance from $(0,0,0)$ to $(a, a, a)$ is exactly $a\sqrt{3}$).

Where Diagonals Appear — Beyond the Polygon

A few places the idea is the foundation under a larger result:

  • Pythagorean triples in carpentry. The "$3$-$4$-$5$ triangle" comes up because a rectangle of sides $3$ and $4$ has a diagonal of $5$ — exactly the trick builders use to square up a foundation.

  • Television screen sizes. A "$55$-inch TV" measures the diagonal of the screen, not the side. A $16:9$ aspect-ratio screen with a $55$-inch diagonal is about $47.9$ inches wide and $26.9$ inches tall.

  • Triangulation in maps. Every modern GPS uses diagonals — straight-line distances from satellites to a receiver — to solve for position.

  • Graph theory. A diagonal in a Latin square or a magic square is a special row that the puzzle uses. The 1948 Latin Square connection by Sir Ronald A. Fisher extended diagonals into agricultural-trial design.

The earliest known proof that a square's diagonal is $a\sqrt{2}$ — and that $\sqrt{2}$ is not a rational number — is attributed to the Pythagorean school around 500 BCE. The proof is short, four lines, and changed mathematics: it forced the existence of irrational numbers for the first time.

Diagonal: Tripping Points to Avoid

Mistake 1: Counting an edge as a diagonal

Where it slips in: A student lists "the four sides plus two diagonals" of a square as $6$ diagonals.

Don't do this: Treat any line segment between two corners as a diagonal.

The correct way: A diagonal joins non-adjacent vertices only. The sides of the polygon are not diagonals. A square has $2$ diagonals, not $6$.

Mistake 2: Adding the sides to find a diagonal

Where it slips in: Rectangle of $5$ cm × $12$ cm — student writes diagonal $= 5 + 12 = 17$.

Don't do this: Sum the sides.

The correct way: Apply Pythagoras: $d = \sqrt{5^{2} + 12^{2}} = \sqrt{169} = 13$ cm.

Mistake 3: Confusing the face diagonal with the space diagonal of a cube

Where it slips in: A problem asks for the longest diagonal of a cube of side $a$; student gives $a\sqrt{2}$.

Don't do this: Stop at the face diagonal.

The correct way: The longest diagonal of a cube is the space diagonal, $a\sqrt{3}$ — corner to opposite corner through the interior of the cube, not across one face.

Conclusion

  • A diagonal joins two non-adjacent vertices of a polygon or polyhedron.

  • An $n$-sided polygon has $\dfrac{n(n-3)}{2}$ diagonals.

  • A square's diagonal is $a\sqrt{2}$; a rectangle's is $\sqrt{l^{2} + b^{2}}$; a cube's space diagonal is $a\sqrt{3}$.

  • The diagonal of every rectangle and square is the hypotenuse of a right triangle — Pythagoras decides the length.

  • The properties of the two diagonals (equal, bisect, perpendicular) identify the type of quadrilateral.

Quick Self-Check — Three Problems

  1. How many diagonals does a decagon ($n = 10$) have?

  2. Find the diagonal of a rectangle of length $9$ cm and breadth $12$ cm.

  3. Find the space diagonal of a cube of side $4$ cm.

If you got $21$ for problem 1, recount — the formula gives $35$.

Want a live Bhanzu trainer to walk your child through diagonals and the Pythagorean shortcut? Book a free demo class — online globally.

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is a diagonal in math?
A line segment joining two non-adjacent vertices of a polygon or polyhedron.
How many diagonals does an octagon have?
Using $\dfrac{n(n-3)}{2}$ with $n = 8$: $\dfrac{8 \times 5}{2} = 20$.
What is the formula for the diagonal of a square?
$d = a\sqrt{2}$, where $a$ is the side length.
Does a triangle have a diagonal?
No. A triangle's three vertices are all adjacent to each other — no non-adjacent pairs exist, so no diagonals can be drawn.
Do the diagonals of a parallelogram bisect each other?
Yes — that's one of the defining properties. They do not bisect at right angles unless the parallelogram is a rhombus or a square.
How is the diagonal of a TV screen measured?
From one corner of the screen to the opposite corner, in inches. The advertised size (e.g., $55$") is the diagonal, not the width.
What's the difference between a face diagonal and a space diagonal?
A face diagonal lies inside one face of a 3D solid (e.g., the diagonal of a single face of a cube, length $a\sqrt{2}$). A space diagonal cuts through the interior of the solid from one corner to the opposite (length $a\sqrt{3}$ for a cube).
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →