If you are standing at any vertex of a convex polygon, there are three vertices to which you cannot draw a diagonal.
You cannot draw a diagonal to the vertex on your left (it would be a side, not a diagonal); you cannot draw a
diagonal to the vertex that you are standing on; and you cannot draw a diagonal to the vertex to your right
(it also would be a side).
You can draw diagonals to each of the other vertices. So, if there are n-vertices, you can draw n - 3 diagonals.
This will be true for each of the vertices: n·(n - 3).
However, when you draw a diagonal from vertex A to vertex G, this will be redrawn as a diagonal from
vertex G to vertex A; so, we'll have to divide the expression above by 2.
The final formula for the number of diagonals in a convex n-gon is: n·(n - 3) / 2
For an octagon, it will be: 8·(8 - 3) / 2