Question 843884
I would make that polygon a convex polygon,
like this: {{{drawing(300,300,-5,5,-1,9,
line(-2,0,3,0),line(-2,0,-4,4),
line(-4,4,-4,7),line(-4,7,-1,9),
line(-1,9,1,8),line(1,8,3,6),
line(3,6,5,2),line(3,0,5,2),
green(line(3,0,3,6)),green(line(3,0,1,8)),
green(line(3,0,-1,9)),green(line(3,0,-4,7)),
green(line(3,0,-4,4))
)}}} so all diagonals will be inside the polygon, and no triangles will overlap.
The answer may be the same for a concave polygon, like this
{{{drawing(300,300,-5,5,-1,9,
line(-2,0,3,0),line(-2,0,-1,4),
line(-1,4,-4,3),line(-4,3,2,7),
line(2,7,-1,8),line(-1,8,3,9),
line(3,9,5,2),line(3,0,5,2)
)}}} , but it is harder to visualize with concave polygons.
I believe the answer is {{{highlight(n-2)}}}
A polygon with {{{n}}} sides has {{{n}}} vertices.
From one of the n vertices, you can draw {{{n-3}}} diagonals to all {{{n-1}}} other vertices except the {{{2}}} adjacent ones.
(The lines connecting to the {{{2}}} adjacent vertices are sides of the polygon, and we cannot call them diagonals).
To one side of each diagonal is a triangle, and you count {{{n-3}}} of those:
one to that side of the first diagonal,
a second one to that side of the second diagonal, and so on.
You count {{{n-3}}} triangles that way.
There is {{{1}}} more triangle to the other side of the last of those diagonals.