A convex polygon with \(n\) sides has \(n\) vertices, and a diagonal can be drawn from each vertex to all but 2 of the other vertices. Iterating over all vertices, and observing the diagonals will be drawn twice, we may hypothesize that the number of diagonals \(D_n\) is given by:
$$D_n=\frac{n(n-3)}{2}$$ where \(3\le n\)
Observing the base case \(D_3=0\) is true, for a triangle has no diagonals, we may use as our inductive step, the addition of another vertex. From this new vertex, diagonals may be drawn to all but \(n-2\) of the other vertices and a new diagonal may now be drawn between the two existing vertices on either side of the new vertex, for a total of \(n-1\) new diagonals. Hence:
$$D_{n+1}=\frac{n(n-3)}{2}+n-1=\frac{n(n-3)+2(n-1)}{2}=\frac{n^2-n-2}{2}=\frac{(n+1)(n-2)}{2}=\frac{(n+1)((n+1)-3)}{2}$$
We have derived \(D_{n+1}\) from \(D_n\), thereby completing the proof by induction.