Count triangles in a pentagon with all of its diagonals drawn How many triangles in this picture? 

I am able to count one by one, but it takes long time. I wonder whether there is an easy way or systematic way to count. Thank you.
 A: Break into cases:


*

*all three vertices of the triangle are on the outer pentagon

*two of the three vertices are adjacent on the outer pentagon while the third is in the inner pentagon

*two of the three vertices are nonadjacent on the outer pentagon while the third is in the inner pentagon

*only one of the three vertices are on the outer pentagon


In case 1, any choice of three distinct vertices will form a triangle, so case 1 contributes $\binom{5}{3}=10$ to the overall sum.
In case 2, notice that any choice of two distinct vertices from the outer pentagon will have a two choices of a third vertex from the inner pentagon such that the three form a triangle in the image.  The number of adjacent pairs is $5$, each of which contributing three to the sum, for a total of $15$ being contributed.

In case 3, notice that any choice of two distinct vertices from the outer pentagon will have a unique choice of a third vertex from the inner pentagon such that the three form a triangle in the image.  The number of nonadjacent pairs is $5$, each of which contributing one to the sum.

In case 4, notice that any choice of single vertex from the outer pentagon has a unique pair of vertices from the inner pentagon such that the three form a triangle in the image.  Thus, case 3 contributes $\binom{5}{1}=5$ to the overall sum.

Finally, notice that no other triangles exist in the image.
This brings the overall sum to $10+15+5+5=35$
A: We use casework. First, we count the number of triangles with all three vertices on the pentagon. Notice that any set of three points on the pentagon will form a triangle. Therefore, here we have $\dbinom{5}{3} = 10$ triangles. Now we count the number of triangles with one or more vertices in the interior of the pentagon. We count this manually - there are $5$ small isosceles triangles, $10$ scalene triangles, and $5$ large isosceles triangles. This is a total of $10 + 5 + 10 + 5 + 5 = \boxed{35}$ triangles.
A: Ordering the $10$ vertices from top to bottom, and in rows left-to-right, the adjacency matrix of this graph is
$$\left(
\begin{array}{cccccccccc}
 0 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 \\
 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 \\
 1 & 1 & 0 & 1 & 1 & 1 & 0 & 0 & 1 & 0 \\
 1 & 1 & 1 & 0 & 1 & 0 & 1 & 0 & 0 & 1 \\
 1 & 1 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 \\
 1 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\
 1 & 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 1 \\
 0 & 1 & 0 & 0 & 1 & 1 & 1 & 0 & 1 & 1 \\
 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 \\
 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\
\end{array}
\right)$$
The trace of the third power of this matrix is $330$, and this counts the triangles in the graph, each six times, giving $55$ triangles But this also counts triangles whose vertices are collinear. This happens when all three vertices are on the same one of the five sides of the “star.” Each star side contains four vertices, so there are ${4\choose3}=4$ such triangles on each of the five star sides. Subtracting these $4\times5=20$ degenerate triangles from the $55$ triangles in the graph leaves $35$ triangles.
