Work out polygon diagonals instantly with clear inputs, formula shown and shareable results.
From each of the n vertices you can draw a diagonal to every vertex except itself and its two neighbours, giving n(n − 3) endpoints. Each diagonal is counted twice, hence n(n − 3)/2.
Number of diagonals
D = n(n − 3) / 2
n(n − 3)/2 = 3 × 0 / 2 = 0; every pair of vertices is already joined by a side.
6 × 3 / 2 = 9.