Free course · Module II · Dimension and construction · Lesson 9 of 21 · about 15 minutes

Box-counting dimension

In this lesson you will
  • Carry out a box-counting estimate
  • Read a dimension from a log–log plot
  • Know when box and Hausdorff dimensions differ

Most natural shapes are not made of exact copies, so the similarity formula cannot be used. Box counting works on any shape. Cover it with a grid of boxes of side ε, and count how many boxes N(ε) contain part of the shape. Repeat with smaller boxes.

Dbox = limε→0 log N(ε) / log(1/ε)

In practice you plot log N(ε) against log(1/ε) and measure the slope of the straight part of the graph. For a smooth curve, halving the box size doubles the count, giving slope 1. For a filled area, halving the box size quadruples the count, giving slope 2.

Box counting is easy to program for images and data, which makes it the most widely used method in science. Its weakness is that it can overestimate. The rational numbers in [0,1] touch every box, so their box dimension is 1, but they are only a countable set of points, whose Hausdorff dimension (next lesson) is 0.

Key terms box counting log–log plot scaling region Minkowski–Bouligand dimension

Try it live: Measured values in the dimension catalogue come from box counting →

Lesson quiz

  1. Halving the box size multiplies the box count by 3. What is the box dimension?

    • 1.5
    • log 3 / log 2 ≈ 1.585
    • 3
    • 2/3
    Show answer

    log 3 / log 2 ≈ 1.585. N(ε/2) = 3N(ε) gives D = log 3 / log 2.

  2. On a box-counting plot, which quantity gives the dimension?

    • The y-intercept
    • The slope of log N against log(1/ε)
    • The largest box count
    • The area under the curve
    Show answer

    The slope of log N against log(1/ε). The dimension is the slope of the straight part of the log–log graph.

  3. The rational numbers in [0,1] have box dimension 1. What is their Hausdorff dimension?

    • 0
    • 1/2
    • 1
    • Undefined
    Show answer

    0. Any countable set has Hausdorff dimension 0. The two dimensions can disagree.

Take this quiz interactively and save your progress (free) →