Geometry

The Sierpinski Triangle: Infinite Holes From One Rule

The Sierpinski triangle is a fractal built by one stubborn instruction: take a solid triangle, cut out the middle upside-down quarter, then repeat that cut on each of the three triangles left behind — forever. What survives has zero area, an infinite boundary, and a dimension that is neither 1 nor 2 but exactly log 3 / log 2 ≈ 1.585. First described by Wacław Sierpiński in 1915, the same lacy shape reappears in Pascal's triangle, in a coin-flipping game, in a cellular automaton, and in the Tower of Hanoi.
  • Hausdorff dimensionlog 3 / log 2 ≈ 1.585
  • Self-similar rule3 copies, each scaled by 1/2
  • Area of the limit set0 (Lebesgue measure zero)
  • Area after n steps(3/4)ⁿ → 0
  • Total edge lengthgrows ×3/2 each step → ∞
  • First describedWacław Sierpiński, 1915

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

One rule, repeated forever

Start with a filled equilateral triangle and call it stage 0. Connect the midpoints of its three sides; this cuts it into four smaller congruent triangles, three pointing the same way as the original and one pointing down in the center. Delete the central, downward triangle. Three triangles remain, each a half-scale copy of the original. Now apply the very same operation to each of those three — remove their middles — to reach stage 2, then stage 3, and so on without end.

The bookkeeping is clean. At stage n there are 3ⁿ surviving triangles, each with side length (1/2)ⁿ of the original. The holes accumulate: at stage 1 you remove one triangle, at stage 2 you remove three more, at stage 3 nine more, and in general 3n−1 new holes at stage n. Summed over all stages that is a countably infinite collection of open triangular holes — the “infinite holes” of the name.

The Sierpinski triangle itself is the limit, the set of points that are never removed at any stage. Formally, if S₀ is the solid triangle and Sn+1 is what you get after cutting every triangle in Sn, then the shapes are nested, S₀ ⊇ S₁ ⊇ S₂ ⊇ …, and the gasket is the intersection S = ⋂n≥0 Sn. As an intersection of nested nonempty compact sets it is nonempty and compact — and it inherits the key property that will not go away: at every scale, it looks like three shrunken copies of itself.

Zero area, but an infinite edge

Track the area. Each cut deletes exactly one of four equal sub-triangles, so it keeps three-quarters of what was there. If A is the area of the original triangle, then stage n has area (3/4)ⁿ · A. Because the gasket sits inside every stage, its area is at most (3/4)ⁿ · A for all n, and (3/4)ⁿ → 0. So the Sierpinski triangle has area exactly zero — it is a measure-zero set in the plane, taking up no more space than a curve.

Now track the edges. At stage n there are 3ⁿ triangles, each with perimeter 3 · (1/2)ⁿ (taking the original side as 1). The total length of all those boundaries is 3ⁿ · 3 · (1/2)ⁿ = 3 · (3/2)ⁿ, which grows by a factor of 3/2 at every stage and therefore diverges to infinity. The limiting set's own one-dimensional length (its Hausdorff H¹ measure) is infinite for the same reason.

There is no paradox once you accept that “length” and “area” are the wrong rulers. A finite line segment has zero area and finite length; a solid disk has finite area. The gasket falls between: it is too sparse to have positive area, yet too rough and branchy to have finite length. That in-between-ness is precisely what a fractional dimension measures — and it is why the object needs a number like 1.585 rather than a clean 1 or 2.

The dimension log 3 / log 2 ≈ 1.585

Dimension can be defined by how detail multiplies as you zoom. For an ordinary shape, halving the ruler multiplies the number of pieces you need by a fixed factor: a line segment splits into 2 half-length copies (2 = 2¹), a filled square into 4 (4 = 2²), a cube into 8 (8 = 2³). The exponent is the dimension. Write it as d = log N / log (1/r), where the object is made of N copies each scaled by ratio r.

The Sierpinski triangle is built from N = 3 copies, each scaled by r = 1/2. Its similarity dimension is therefore

  • d = log 3 / log 2 ≈ 1.58496…

You reach the same value by box-counting: cover the set with boxes of side (1/2)ⁿ and you need about 3ⁿ of them, so the box-counting dimension is lim (log 3ⁿ) / (log 2ⁿ) = log 3 / log 2. Because the three sub-triangles meet only at single points (the midpoints of the big triangle's sides) — they satisfy the open set condition — Moran's and Hutchinson's theorems guarantee that the box-counting and Hausdorff dimensions agree, and that the gasket carries positive, finite Hausdorff measure in dimension 1.585.

This is exactly Mandelbrot's working definition of a fractal: an object whose Hausdorff dimension strictly exceeds its topological dimension. The Sierpinski triangle is a connected curve-like continuum, so its topological dimension is 1, yet its Hausdorff dimension is 1.585. The gap between the two numbers is the roughness the eye reads as “fractal.”

A unique attractor: the fixed point of three maps

The construction hides a cleaner description. Place the triangle's vertices at points v₁, v₂, v₃ and define three shrink-toward-a-corner maps on the plane:

  • fi(p) = (p + vi) / 2 — halve the distance from p to vertex vi.

Each fi is a contraction with ratio 1/2, and each sends the whole triangle onto one of its three corner sub-triangles. This trio is an iterated function system (IFS). Collect them into the Hutchinson operator W(X) = f₁(X) ∪ f₂(X) ∪ f₃(X), which takes a set and returns the union of its three half-size copies — one application of the removal rule.

Hutchinson (1981) showed that W is itself a contraction, not on points but on the space of nonempty compact subsets of the plane, measured by the Hausdorff metric (roughly, two sets are close if each lies within a small band of the other). That space is complete, so Banach's fixed-point theorem applies: W has exactly one fixed point, and iterating W from any starting compact set converges to it. The Sierpinski triangle is that unique attractor — the one set S with S = W(S). Start from a square, a circle, or a single blob; hit it with W a dozen times and the gasket emerges, because the shape is encoded entirely in the three rules, not in where you began.

The same shape in disguise

Because the gasket is the fingerprint of those three maps, it surfaces wherever the maps are hiding.

The chaos game. Mark the three vertices. Drop a point anywhere, then repeat: pick one vertex at random and step halfway toward it, plotting each landing spot. This is just applying a randomly chosen fi over and over. After discarding a few transient points, the dots trace out the Sierpinski triangle. The reason is that the random IFS has a unique invariant (Hutchinson) measure supported on the attractor, and the orbit's points equidistribute onto it — order emerging from pure coin-flips, which is why Barnsley called it a “chaos game.”

Pascal's triangle mod 2. Print Pascal's triangle and color a cell black when the binomial coefficient is odd, white when even. The odd cells form the Sierpinski triangle. By Lucas' theorem, C(n, k) is odd exactly when, writing n and k in binary, every 1-bit of k also appears in n (equivalently k AND n = k; Kummer's theorem says this is the “no carries when adding” condition). That submask pattern is self-similar under doubling, so the first 2k rows are three copies of the previous block — a gasket.

Rule 90. In this elementary cellular automaton each cell becomes the XOR of its two neighbors. Start from a single black cell on a white line and let time run downward; the space-time diagram is again the Sierpinski triangle, because Rule 90 computes exactly the binomial coefficients modulo 2.

Tower of Hanoi, history, and where it shows up

The pattern even governs a puzzle. Consider the Tower of Hanoi with n disks on 3 pegs, and draw its state graph: one vertex per legal arrangement, one edge per legal single-disk move. This graph has 3ⁿ vertices and is the Sierpiński graph S3n — a finite gasket. The three corners are the “all disks on one peg” states; the shortest path between two corners has length 2ⁿ − 1, the famous minimum number of moves, running straight along one edge of the triangle. As n grows, the rescaled graph converges to the Sierpinski gasket itself.

Historically, Wacław Sierpiński introduced the set in 1915 as an example of a curve every point of which is a branch point — a deliberately pathological object at a time when such “monsters” unsettled analysts. Sixty years later Benoit Mandelbrot recast these monsters as fractals (1975), turning them from curiosities into a language for roughness in nature.

The gasket is not only decorative. Its set of points is uncountable (each point has an infinite “address” of vertex choices) yet nowhere dense and of measure zero, a vivid separation of “how many” from “how much.” Its self-similar branching makes it a real engineering tool: fractal antennas shaped like the gasket resonate on many frequencies at once thanks to their repeating structure, and the shape serves as a testbed for diffusion, resistance networks, and spectra on fractal domains — the mathematics of one endlessly repeated cut.

Classic self-similar fractals: how many shrunken copies, at what scale, and the dimension and size that result.
FractalRule (copies × scale)Hausdorff dimensionSize of the limit set
Cantor set2 copies × 1/3log 2 / log 3 ≈ 0.631Length 0; uncountably many points
Koch curve4 copies × 1/3log 4 / log 3 ≈ 1.262Infinite length; snowflake encloses finite area
Sierpinski triangle3 copies × 1/2log 3 / log 2 ≈ 1.585Area 0; infinite boundary length
Sierpinski carpet8 copies × 1/3log 8 / log 3 ≈ 1.893Area 0; universal plane curve
Menger sponge20 copies × 1/3log 20 / log 3 ≈ 2.727Volume 0; infinite surface area

Frequently asked questions

Why does the Sierpinski triangle have zero area?

Every step of the construction throws away one of four equal sub-triangles, keeping 3/4 of the area. After n steps only (3/4)ⁿ of the original area remains, and (3/4)ⁿ shrinks to 0 as n grows. Since the final set lies inside every stage, its area is smaller than (3/4)ⁿ for all n, which forces the area to be exactly zero.

What does a dimension of 1.585 actually mean?

Dimension counts how detail multiplies when you zoom in. Halving your ruler reveals 3 copies of the gasket, and 3 = 2^1.585, so the exponent — its dimension — is log 3 / log 2 ≈ 1.585. It sits between a line (dimension 1) and a filled shape (dimension 2) because it is more space-filling than a curve but too full of holes to cover area.

How can it have zero area but an infinite boundary?

Area and length measure different things. At stage n the surviving triangles have total edge length 3·(3/2)ⁿ, which grows without bound, while their total area (3/4)ⁿ shrinks to nothing. The set is too thin to hold area yet too crinkled to have finite length — exactly the situation a fractional dimension is designed to describe.

Why does the random 'chaos game' draw the same fractal?

Stepping halfway toward a randomly chosen vertex is just applying one of the three contraction maps that define the gasket. Those maps have a single attractor — the Sierpinski triangle — and the random orbit spreads out to fill it evenly, matching the system's unique invariant measure. After a few throwaway points, the plotted dots land only on the fractal.

How is it connected to Pascal's triangle?

If you color the odd numbers in Pascal's triangle black and the even ones white, the black cells form the Sierpinski triangle. Lucas' theorem says a binomial coefficient C(n,k) is odd exactly when the binary digits of k never exceed those of n, and that binary 'submask' rule repeats at every scale of doubling, producing the self-similar gasket.

Who discovered it and is it used for anything?

Wacław Sierpiński described it in 1915 as an example of a curve branching at every point; Mandelbrot later folded such shapes into the theory of fractals. Beyond pure math it appears in the Tower of Hanoi's state graph and in Rule 90 cellular automata, and its multi-scale structure is exploited in compact multi-band fractal antennas.