The definition
In geometry, a diagonal of a polygon is a straight line segment that joins two vertices (corners) that are not next to each other. Two vertices are next to each other when a side connects them, so a diagonal never runs along an edge. The word comes from a Greek phrase meaning “from angle to angle,” which fits the idea of a line from corner to corner.
How many diagonals a polygon has
A polygon with n sides has n(n-3)/2 diagonals. A few examples:
- Triangle (3 sides): 0 diagonals.
- Quadrilateral (4 sides): 2 diagonals.
- Pentagon (5 sides): 5 diagonals.
- Hexagon (6 sides): 9 diagonals.
The formula works because each corner can connect to every other corner except itself and its two neighbors. That gives n(n-3) connections across all the corners, and each diagonal is counted twice, so the total is n(n-3)/2.
Diagonals in shapes you know
A triangle has no diagonals, because every pair of its corners is already joined by a side. Most four-sided shapes, such as squares, rectangles and parallelograms, have two. Shapes with more sides have more diagonals, and the count grows quickly.
Diagonals inside and outside the shape
In a convex polygon, where every interior angle is less than 180 degrees, all of the diagonals lie inside the shape. A concave polygon, such as an arrowhead-shaped quadrilateral, can have a diagonal that runs outside it.
The navigation meaning is different
On a map or compass, the word “diagonal” usually describes a direction rather than a line between corners. Northeast, southeast, southwest and northwest are the diagonal directions, each halfway between two compass points. When you read a map, check whether the word is describing a shape or a bearing.