Triangle Counting Puzzle

How Many Triangles Are In This Shape

PL
l-diplomas.com
10 min read
How Many Triangles Are In This Shape
How Many Triangles Are In This Shape

You're staring at a triangle made of smaller triangles. Or maybe it's a star. Also, or a hexagon subdivided into a dozen overlapping regions. Consider this: the caption reads: "How many triangles? 90% get this wrong.

You count. You recount. Worth adding: you get 17. Your friend gets 24. The comments section is a war zone.

Sound familiar?

These puzzles show up everywhere — Instagram reels, LinkedIn engagement bait, actual math competitions, and that one group chat where someone inevitably posts "bet you can't solve this.Consider this: " They're deceptively simple. Which means a shape. A question. And a answer that feels like it should be obvious but almost never is.

Here's the thing: counting triangles isn't about having good eyesight. It's about having a system.

What Is a Triangle Counting Puzzle

At its core, a triangle counting puzzle presents a geometric figure — usually composed of straight lines intersecting — and asks for the total number of triangles of any size* contained within it.

That "any size" part is where people trip up.

The figure might be:

  • A large triangle subdivided by lines parallel to its sides (the classic "triangular grid")
  • A star polygon (like a pentagram or Star of David)
  • A square or rectangle with diagonals and cross-lines
  • A hexagon with all diagonals drawn
  • Something completely irregular someone doodled on a napkin

The task is always the same: count every distinct set of three non-collinear points that form a triangle whose edges lie along the drawn lines.

Simple definition. Maddening execution.

The Two Flavors You'll Encounter

Most puzzles fall into two categories, and knowing which one you're dealing with changes your approach.

Regular grids — Think equilateral triangle subdivided into 16, 25, or 36 smaller congruent triangles. These have formulas. Beautiful, clean formulas. If you recognize the pattern, you can solve a 100-row triangle in seconds without counting a single one by hand.

Irregular / composite figures — A star with overlapping triangles. A square with both diagonals plus a horizontal and vertical midline. A random geometric logo. These resist formulas. You need a methodical counting strategy, not a memorized equation.

The internet loves mixing these. Consider this: that's intentional. Think about it: a puzzle might look* like a regular grid but have one extra line thrown in to break the pattern. It forces you to actually think instead of plugging into a formula.

Why This Skill Actually Matters

Okay, "matters" might be strong. But it's not just internet points.

Triangle counting trains a specific kind of spatial reasoning — the ability to hold a complex visual structure in your head, decompose it into components, and systematically enumerate combinations without double-counting or missing cases. That's the same cognitive muscle used in:

  • Graph theory (counting cycles of length 3)
  • Computational geometry (mesh analysis, triangulation)
  • Network science (clustering coefficients)
  • Even chemistry (counting triangular motifs in molecular structures)

More practically: it teaches you to be systematic instead of frantic. The difference between "I think it's 27" and "Here's my organized count by size and orientation, and it's 27" is the difference between guessing and knowing.

And honestly? On top of that, it's satisfying. In real terms, there's a click when the last triangle falls into place and your numbers reconcile. That click is why these puzzles persist.

How to Count Triangles Without Losing Your Mind

No single method works for every figure. But a toolkit of approaches covers almost everything you'll encounter.

1. The Size Classification Method (Best for Regular Grids)

This is the gold standard for triangular grids. The idea: count triangles by side length.

In an equilateral triangle subdivided into n smaller triangles per side (so smallest triangles total), triangles come in discrete sizes. Size 1 = smallest. Size 2 = made of 4 small ones. On the flip side, size 3 = made of 9. Up to size n = the whole figure.

For each size k, there are two orientations: pointing up and pointing down (except the largest, which only points up).

Upward triangles of size k: (n - k + 1)(n - k + 2) / 2
Downward triangles of size k: (n - 2k + 1)(n - 2k + 2) / 2 (only when n ≥ 2k)

Sum across all valid k. Done.

Example: n = 4 (16 small triangles)

  • Size 1 up: 10, down: 6 → 16
  • Size 2 up: 6, down: 1 → 7
  • Size 3 up: 3, down: 0 → 3
  • Size 4 up: 1 → 1 Total: 27

Memorize this if you see these puzzles often. Or derive it once, understand why it works, and you'll never need to memorize.

2. The Vertex Combination Method (Best for Irregular Figures)

Every triangle is defined by three vertices. If you can list all intersection points in the figure, the problem becomes: how many 3-vertex combinations form a triangle whose edges exist in the drawing?

Steps:

  1. Label every intersection point (A, B, C...Worth adding: )
  2. List all line segments between points
  3. Also, for each triple of points, check: are all three pairwise connections present as drawn segments? 4.

Tedious by hand for large figures. But it's the most rigorous approach — and it's trivial to automate. If you're doing this programmatically (Python + networkx, or even a spreadsheet), this is the method.

For hand-solving, use it on smaller figures (under 15 vertices). For larger ones, it's a sanity check on a subsection.

3. The Region Decomposition Method (Best for Composite Figures)

Break the figure into non-overlapping regions you know* how to count, then add correction terms for triangles that cross boundaries.

For more on this topic, read our article on what are products of neutralization reaction or check out what is the charge of zinc.

Say you have a square with both diagonals plus a horizontal midline. That's two 4×4 triangular grids sharing a base, plus the midline creates new cross-boundary triangles.

Count each half separately using the grid formula. Then systematically count triangles that use vertices from both* halves. Usually there aren't many — the midline limits them.

This method shines when a figure is "almost" a known type but has extra lines. Think about it: don't reinvent the wheel. Count the known part, then handle the exceptions.

4. The Systematic Enumeration Protocol (The "Don't Trust Your Eyes" Method)

When formulas fail and the figure is too messy for clean decomposition, you need a counting protocol that guarantees completeness. Here's one that works:

Step 1: Pick an anchor. Choose a vertex, or a smallest triangle, or a specific line segment. This is your starting reference.

Step 2: Enumerate by category. Define categories that partition the set of all triangles — no overlap, no gaps. Good categories:

  • By size (small, medium, large)
  • By orientation (up, down, tilted)
  • By "highest vertex" or "leftmost vertex"
  • By whether they contain a specific landmark (the center point, a specific small triangle)

Step 3: Count each category exhaustively. Use a consistent scan pattern. Left to right, top to bottom. Mark them on a printed copy or digital annotation. Don't rely on memory.

Step 4: Cross-check with a different categorization. Count again using a different* partition (e.g., first by size, then by orientation). If totals match, you're almost

4. The Systematic Enumeration Protocol (continued)

Step 5: Verify completeness.
After you’ve tallied every category, do a quick “sweep” of the drawing one more time, this time looking for any triangle that doesn’t* fit any of the categories you listed. Even a single stray shape means you’ve missed a case. A simple way to do this is to overlay a grid of the same resolution you used for counting and check each cell for an uncounted triangle.

Step 6: Double‑check with a different anchor.
Pick a different starting point—perhaps the opposite corner of the figure or a different small triangle—and repeat the categorization. If both counts agree, you are practically guaranteed to have captured every triangle.

Illustrative example
Take the classic “grid of six squares” (a 3 × 2 rectangle subdivided into unit squares).

  1. Anchor at the lower‑left corner.
  2. Categories:
    • Small (1 × 1) triangles: 12
    • Medium (1 × 2) triangles: 6
    • Large (2 × 2) triangles: 2
  3. Total: 20.4. Re‑anchor at the upper‑right corner, redo the categories, and you again get 20.
    The quick visual sweep confirms no missing shapes.

5. When the Figure is Too Wild for Hand Counting

Even with a systematic protocol, some hand‑drawn patterns—think of a radial “spider” of lines, a fractal‑like starburst, or a dense tangle of overlapping polygons—can make exhaustive enumeration feel like a chore. In such cases, a small computational aid can turn the job from a headache into a one‑liner.

5.1. Quick Python + NetworkX

import networkx as nx
import itertools

# vertices are tuples of coordinates; edges are straight segments
vertices = [(x, y) for x in range(4) for y in range(4)]
edges = [(v, w) for v in vertices for w in vertices
         if v != w and # add your own line‑of‑sight test here
            ((v[0]-w[0])**2 + (v[1]-w[1])**2) <= 2]   # example cutoff

G = nx.Graph()
G.add_nodes_from(vertices)
G.add_edges_from(edges)

triangles = [c for c in itertools.combinations(vertices, 3)
             if G.has_edge(c[0], c[1]) and G.has_edge(c[1], c[2]) and G.

print(f"Total triangles: {len(triangles)}")

Replace the edge‑filter logic with the precise rule for your figure (e.Practically speaking, g. , check punts, collinearity, or intersection). The script will output the exact count instantly, eliminating human parker‑overlook errors.

5.2. Spreadsheet Method

If coding feels overkill, a spreadsheet can serve the same purpose:

  1. But list every vertex with a unique ID. 4. And 3. On top of that, rush a table of all possible pairs and mark “1” if a segment exists. 2.For every combination of three vertices, use a COUNTIFS* style formula to test whether all three edges are present.
    Sum the results.

This visual approach is handy for verifying a hand‑count or for training students to think algorithmically.


6. Choosing the Right Strategy

Figure type Best method Why
Regular grids, lattices Grid‑formula (Section 1) Closed‑form counts exist
Skewed or partially‑complete grids Region decomposition (Section 3) Leverages known sub‑structures
Random or highly irregular line sets Systematic enumeration (Section 4) Guarantees completeness
Extremely dense or computationally heavy Automated scripts (Section 5) Eliminates manual fatigue

A good rule of thumb: start simple. Consider this: draw the figure, see if it resembles a textbook shape. If it does, pull the formula. Which means if not, try to break it into familiar pieces. Only when the figure resists both do you bring in a computer.


Conclusion

Counting triangles in an arbitrary diagram is not a mysterious art; it’s a systematic exercise that blends geometry, combinatorics, and a dash of patience. In practice, for the composite or partially completed patterns, decompose and conquer. By labeling vertices, cataloguing edges, and partitioning the problem into manageable chunks, you can avoid the common pitfalls of “count‑as‑you‑see.” For the clean, lattice‑like drawings, a single formula does the job. When the geometry becomes too tangled for human eyes, a short script or a spreadsheet turns the task into a mechanical routine.

Remember, atitudes matter: trust the structure, not the eye. With the methods above,

With the methods above, you can handle the complexities of geometric counting with confidence and precision. But whether you are tracing a simple grid or analyzing a complex network of intersecting lines, the key lies in understanding the underlying mathematical relationships. By applying the right combination of analytical formulas, algorithmic approaches, and visual tools, what once seemed like an overwhelming puzzle becomes a manageable, even enjoyable, problem. The beauty of this discipline is that it bridges the gap between pure mathematics and practical application, allowing you to see the hidden structures that govern the patterns around you. Embrace the systematic approach, and let the geometry speak for itself.

New

Latest Posts

Related

Related Posts

Thank you for reading about How Many Triangles Are In This Shape. We hope this guide was helpful.

Share This Article

X Facebook WhatsApp
← Back to Home
L-

l-diplomas

Staff writer at l-diplomas.com. We publish practical guides and insights to help you stay informed and make better decisions.