Suppose a polygon has n vertices (and sides).

The number of diagonals from a single vertex is 3 less the the number of vertices or sides, or (n-3).

So n-3 diagonals can be drawn from each vertex.

But each diagonal has two ends, so we would be counting each one twice.

Dividing by two gives the actual number of diagonals.

Number of diagonals =