Sierpiński Triangle and Square Carpet
What happens when a simple geometric shape is repeatedly divided and parts of it are removed? The answer is surprisingly beautiful: a fractal. The Sierpiński triangle and Sierpiński carpet are two classic examples of this idea.
1. What is a fractal?
A fractal is a mathematical pattern that can show similar structure at different scales. Instead of drawing a complicated shape all at once, we can often create it by repeating a simple rule.
Think about a photograph of a tree. A large branch divides into smaller branches, and those smaller branches divide again. A mathematical fractal uses a precise rule to create a similar kind of repeated structure.
Recursion means that after completing one step, we apply the same rule to the smaller pieces created in that step.
2. The Sierpiński triangle
The Sierpiński triangle, also called the Sierpiński gasket, begins with an equilateral triangle. The construction is repeated as follows:
- Divide the triangle into four congruent smaller equilateral triangles.
- Remove the central, upside-down triangle.
- Three smaller triangles remain.
- Apply exactly the same rule to each of those three triangles.
- Continue the process again and again.
What happens at each step?
At every iteration, each filled triangle is replaced by three smaller filled triangles. Therefore, the number of filled triangles is multiplied by 3 at each step.
3. The Sierpiński square carpet
The square version is usually called the Sierpiński carpet. Its construction follows the same recursive idea, but it starts with a square rather than a triangle.
- Divide the square into a 3 × 3 grid.
- Remove the central square.
- Eight smaller squares remain.
- Divide each remaining square into a 3 × 3 grid.
- Remove the centre of every one and repeat.
The numbers behind the carpet
Each step keeps 8 of the 9 smaller squares. Consequently, the number of remaining squares grows by a factor of 8 while the side length of each square is reduced by a factor of 3.
4. Why are they called self-similar?
Look closely at a Sierpiński triangle. Each of its three large remaining parts has the same basic structure as the complete figure. The same is true for the Sierpiński carpet: each of the eight main remaining squares contains a smaller version of the carpet pattern.
This property is called self-similarity. It is one of the most important ideas in fractal geometry.
🔺 Triangle
Divide into 4 equal triangles, remove 1, and repeat on the remaining 3.
⬛ Square carpet
Divide into 9 equal squares, remove 1, and repeat on the remaining 8.
5. A surprising fact about area
Both constructions become increasingly full of holes. Yet their areas approach zero in the limiting process.
For the triangle, the remaining area after n steps is (3/4)ⁿ times the original area. As n becomes very large, this approaches 0.
For the carpet, the remaining area after n steps is (8/9)ⁿ times the original area. This also approaches 0.
This is a beautiful example of how an object can have an increasingly intricate boundary and structure even while the ordinary area left inside it becomes arbitrarily small.
6. Fractal dimension
Ordinary geometry gives familiar dimensions: a line has dimension 1, a plane has dimension 2, and a solid has dimension 3. Fractals can have dimensions between these familiar values.
| Fractal | Self-similar copies | Scale factor | Fractal dimension |
|---|---|---|---|
| Sierpiński triangle | 3 | 1/2 | log(3) / log(2) ≈ 1.585 |
| Sierpiński carpet | 8 | 1/3 | log(8) / log(3) ≈ 1.893 |
These dimensions are larger than 1 but smaller than 2, reflecting the fact that these objects are more complicated than a simple curve but do not fill a two-dimensional region in the ordinary sense.
7. Connection with computer science
Sierpiński patterns are also useful for understanding ideas that appear in computer science. Their construction is naturally recursive: a program can create a large figure by calling the same procedure on smaller parts.
This makes fractals a good classroom example of recursion, divide-and-conquer, algorithms and computer-generated graphics.
8. Where do we see fractal ideas?
- Computer graphics: recursive rules can generate detailed patterns and landscapes.
- Mathematics: fractals provide important examples in geometry, limits and dimension.
- Computer science: recursive algorithms can be visualised through fractal construction.
- Nature: some natural structures show approximate self-similar patterns, although real natural objects are not exact mathematical fractals.
- Art and design: repeated geometric patterns can create complex visual structures from very simple rules.
9. Sierpiński triangle vs Sierpiński carpet
| Feature | Sierpiński triangle | Sierpiński carpet |
|---|---|---|
| Starting shape | Equilateral triangle | Square |
| Subdivision | 4 smaller triangles | 9 smaller squares |
| Removed each step | 1 central triangle | 1 central square |
| Copies retained | 3 | 8 |
| Scale of each copy | 1/2 | 1/3 |
| Limiting area | 0 | 0 |
10. The big idea to remember
The Sierpiński triangle and carpet show that complicated-looking mathematical structures do not always require complicated instructions. A short recursive rule, repeated many times, can produce extraordinary geometry.
Frequently Asked Questions
Is the Sierpiński triangle an ordinary triangle?
It starts as an equilateral triangle, but after repeated removals its final fractal structure is much more intricate than an ordinary filled triangle.
Why is the Sierpiński carpet called a carpet?
Its construction begins with a square and repeatedly removes the central square, producing a perforated, carpet-like pattern.
Can a computer generate these patterns?
Yes. A recursive program can generate both patterns by applying the same construction rule to smaller regions. This is a simple and visual introduction to recursion.
Are these patterns infinite?
The mathematical fractals are defined by continuing the process indefinitely. A computer or printed page can only show a finite number of iterations, but each additional iteration reveals more of the underlying pattern.