• Foundation
  • About 14 min
  • 5 practice questions

Fractals: the Sierpinski carpet and triangle

Recognise self-similar shapes, build the Sierpinski carpet and triangle step by step, and count the pieces, holes and remaining area at any step using powers.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Explain what a self-similar shape (a fractal) is, with examples from nature.
  • Draw the first steps of the Sierpinski carpet and the Sierpinski triangle.
  • Count the remaining pieces and holes, and find the remaining area, at step n.

Look closely at a fern leaf: each small leaflet looks like a tiny copy of the whole leaf, and each leaflet has even smaller copies along it. A tree does the same: a trunk splits into limbs, limbs into branches, branches into twigs. Shapes that repeat the same pattern at smaller and smaller scales are called self-similar, and the mathematical shapes built this way are called fractals. Coastlines, clouds, lightning and river networks show this pattern too.

The Sierpinski carpet

The Polish mathematician Wacław Sierpinski described this fractal. Step 0: start with a square. Step 1: divide it into 9 equal smaller squares (a 3 by 3 grid) and remove the middle one, leaving 8 squares and 1 hole. Step 2: do the same to each of the 8 remaining squares. Keep repeating. The true carpet is what you approach after infinitely many steps.

The rule repeated at every step

  1. Take every remaining square
  2. Divide it into a 3 by 3 grid of 9 smaller squares
  3. Remove the middle square, making a new hole
  4. Keep the 8 outer squares for the next step

Then back to step 1: Take every remaining square

Counting squares and holes

Let Rₙ be the number of squares remaining at step n and Hₙ the number of holes. Each remaining square produces 8 squares at the next step, so Rₙ₊₁ = 8 × Rₙ. Starting from R₀ = 1, we get R₁ = 8, R₂ = 8 × 8 = 64, and in general Rₙ = 8ⁿ. Each remaining square also produces one new hole, and old holes stay, so Hₙ₊₁ = Hₙ + Rₙ. Starting from H₀ = 0: H₁ = 1, H₂ = 1 + 8 = 9, H₃ = 1 + 8 + 64 = 73.

The Sierpinski carpet (starting area 1 square unit)
StepSquares remainingHolesArea remaining
0101
1818/9
264964/81
351273512/729
n8ⁿ1 + 8 + … + 8ⁿ⁻¹(8/9)ⁿ

Worked example 1: area of the carpet

A square of area 81 cm² is used to start a Sierpinski carpet. What area remains after step 2?

At each step, 8 of every 9 equal parts remain, so the area is multiplied by 8/9.
After step 1: 81 × 8/9 = 72 cm². After step 2: 72 × 8/9 = 64 cm².
In one go: 81 × (8/9)² = 81 × 64/81 = 64 cm². As the steps continue, the remaining area keeps shrinking towards 0, while the number of holes keeps growing.

The Sierpinski triangle (gasket)

Start with an equilateral triangle and join the midpoints of its sides. This makes 4 identical equilateral triangles. (Each corner triangle has two sides of half the original length around a 60° angle, so it is isosceles with a 60° angle, which makes it equilateral.) Remove the middle one, then repeat with each of the 3 corner triangles, and so on.

Worked example 2: counting the triangle

Each remaining triangle produces 3 at the next step, so the number of triangles remaining is 3ⁿ: 1, 3, 9, 27, …. Each remaining triangle also produces one new hole: holes are 0, 1, 1 + 3 = 4, 1 + 3 + 9 = 13, …. Each step keeps 3 of every 4 equal parts, so the area remaining at step n is (3/4)ⁿ of the start. At step 2 that is 9/16 of the original triangle; at step 3 it is 27/64.

A fractal repeats the same rule at smaller and smaller scales. If each piece becomes k pieces at every step, there are kⁿ pieces at step n.

Key takeaways: fractals are self-similar: parts look like smaller copies of the whole. In the Sierpinski carpet each square becomes 8 squares and a hole, giving 8ⁿ squares and (8/9)ⁿ of the area at step n. In the Sierpinski triangle each triangle becomes 3 triangles and a hole, giving 3ⁿ triangles and (3/4)ⁿ of the area.

Check your understanding

  1. 1. How many small squares remain at step 3 of the Sierpinski carpet?

    1. 24
    2. 512
    3. 81
    4. 729
    Show answer

    Answer: B. The number remaining is multiplied by 8 at each step: 8, 64, then 8 × 8 × 8 = 512 at step 3. (729 = 9³ would count the removed squares too.)

  2. 2. How many holes does the Sierpinski carpet have at step 2?

    1. 8
    2. 16
    3. 9
    4. 64
    Show answer

    Answer: C. Step 1 makes 1 hole. At step 2, each of the 8 remaining squares gets a new hole, and the old hole stays: 1 + 8 = 9 holes.

  3. 3. A Sierpinski triangle starts with area 1 square unit. What area remains after step 2?

    1. 9/16
    2. 1/2
    3. 3/8
    4. 1/16
    Show answer

    Answer: A. Each step keeps 3 of the 4 equal triangles, multiplying the area by 3/4. After two steps: 3/4 × 3/4 = 9/16 of a square unit.

  4. 4. How many triangles remain at step 4 of the Sierpinski triangle?

    1. 12
    2. 64
    3. 27
    4. 81
    Show answer

    Answer: D. Each triangle becomes 3 at every step: 3, 9, 27, then 3 × 27 = 81 at step 4, that is 3⁴ = 81.

  5. 5. Which statement describes a fractal?

    1. It is always a square
    2. It shows the same pattern repeated at smaller and smaller scales
    3. It has no straight edges
    4. It can only be drawn on a computer
    Show answer

    Answer: B. A fractal is self-similar: the same pattern appears again and again at smaller scales, like the leaflets of a fern. The Sierpinski shapes have straight edges and can be drawn by hand.

Privacy · Terms · Refunds · Delivery