Count the number of triangles

math
geometry
combinatorics
Author

Souvik Sarkar

Published

2025-05-21

Problem

Count the number of triangles formed by inscribing a star in a regular pentagon.

Solution

To begin with, one can try to count the number of triangles by using what’s typically known as the brute force approach, i.e., name every vertex and points of intersection, and write the names of the triangles thus formed. However, it becomes quickly evident that the number of triangles is not small enough to be counted by such an approach, and there are high chances that some triangles will be missed. In addition, brute force does not scale well if the problem becomes more complex. For example, what if another star is drawn within the innermost pentagon, or the outer polygon is a regular hexagon?

Another possible thought would be to blindly apply combinatorics formulae, but I call such an approach to be formularized brute force. Although one can work with such an approach, it is not a safe one, in the sense that there are many exceptions in the figure given to us. For example, not all vertices are interconnected to one another, and most vertices are only connected to a specific subset of points formed by intersecting lines.

To solve the problem, I have used a hybrid approach. Combinatorics have been used only when it is absolutely necessary, and the rest is simple arithmetic stemming from a fundamental fact about triangles: you need three non-collinear points to form a triangle.

Strategy

The strategy here is as follows:

  1. Segregate the different categories of triangles based on how the vertices are distributed, and calculate the number of triangles for each category. Observe that there are only three such categories:

    • Category 1: All three vertices of a triangle belongs to the set of vertices of the pentagon, and therefore, lie along the perimeter of the structure. Applying the straight forward combinatorics formula, we get that the number of such triangles is \binom{5}{3} = 10.

    • Category 2: Two of the vertices of a triangle belongs to the set of points of intersection within the pentagon, and the third vertex is along the perimeter. Imagine each edge of the innermost pentagon to be the base of a triangle, because they join two adjacent inner points of intersection. Then the third vertex opposite to the base is simply the one on the perimeter. From the figure, it is evident that there are only 5 such triangles.

    • Category 3: Two of the vertices of a triangle are along the perimeter, and the third vertex belongs to the set of points of intersection within the pentagon. This is the trickiest category, and it’s easy to miss some triangles hiding here. Observe that the two vertices along the perimeter falls into the following subcategories:

      • The two vertices along the perimeter are adjacent to one another. In this case, imagine that an edge of the pentagon is the base of some triangles, whose third vertex is one of the inner points of intersection. It’s easy to see that each edge of the pentagon serves as the base for three such triangles. A pentagon has five edges, and therefore, there are 5 × 3 = 15 such triangles.

      • The two vertices along the perimeter are not adjacent to one another. In such cases, you will find that the two non-adjacent vertices along the perimeter are joined by a straight line, which is part of the inner star. It’s easy to see that each such line forms the base of exactly one triangle, whose third vertex is an inner point of intersection. There are five such straight lines forming the star, and therefore, five such triangles.

  2. Find the total number of triangles by adding the numbers from each category: 10 + 5 + (15 + 5) = 35.

Conclusion

The beauty of this problem lies in the fact that we can derive an elementary solution, simply by observing the characteristics of the figure. It teaches us that solving problems is not about using heavy mathematical machinery, but being observant and thoughtful about what has been given to us.

Citation

BibTeX citation:
@online{sarkar2025,
  author = {Sarkar, Souvik},
  title = {Count the Number of Triangles},
  date = {2025-05-21},
  url = {https://cuimri.com/posts/count-the-triangles/},
  langid = {en}
}
For attribution, please cite this work as:
Sarkar, Souvik. 2025. “Count the Number of Triangles.” May 21, 2025. https://cuimri.com/posts/count-the-triangles/.