The Pythagoras tree explained
The Pythagoras tree is the theorem of Pythagoras turned into a plant. Put a right triangle on a square, a square on each of the triangle's short sides, and keep going. After a dozen levels thousands of squares form a tree with a trunk, branches and a crown of leaves, and every level of it has exactly the area of the trunk.
Squares on a right triangle
Draw a right triangle and a square on each of its three sides. The theorem of Pythagoras says that the two squares on the short sides together have the same area as the square on the long side: a² + b² = c². The figure is as old as geometry books; in Euclid's Elements it is the proof of Proposition 47 of Book I. The Pythagoras tree uses it as a building block, with the large square at the bottom and the two small squares growing out of it like branches.
How the tree grows
Start with one square, the trunk. Put a right triangle on its top edge, with the long side on the square, and build a square on each of the two short sides. Those two squares are level 1. Do the same on each of them and you get the four squares of level 2, then 8, 16, 32 and so on: level n has 2ⁿ squares, and a tree of depth n has 2ⁿ⁺¹ − 1. A depth of 15, the deepest the generator draws, means 65,535 squares.
Every level has the area of the trunk
Because a² + b² = c², the two squares that grow out of a square share its area between them. Their four children share that again, and so on: every level of the tree, however many squares it has, adds up to exactly the area of the trunk. A tree of depth 12 therefore holds 13 trunks' worth of squares. The sum grows without limit as the tree grows, yet the tree itself stays within a fixed box, so from some level on the squares must overlap.
The symmetric tree: a box of 6 by 4
With an angle of 45° the triangles are isosceles, the two new squares are equal, and each is 1/√2 the size of the square below it. The tree is symmetric, and however deep it grows it never leaves a box 6 trunks wide and 4 trunks high. Its leaves touch and overlap, and the crown fills a region with a fractal outline. This is the tree most people know from posters and textbooks.
Leaning trees and spirals
Any other angle makes the two squares unequal: at the angle α the left square has cos α and the right one sin α of the side below. The tree leans to the side of the larger squares. Follow the always-left branch upwards and every square is the one before it, turned by the same angle and shrunk by the same factor, so the squares wind along a logarithmic spiral, like a snail's shell. The whole tree is made of such spirals, inside spirals. The 3-4-5 triangle, at an angle of 36.87°, is a favourite: it is the smallest right triangle with whole-number sides, and its squares share the area as 16 to 9.
Why the dimension is 2
The tree is made of the trunk and two copies of the whole tree, one scaled by cos α and one by sin α. For such a shape the similarity dimension d is the number for which cosᵈ α + sinᵈ α = 1 (the Moran equation). By the theorem of Pythagoras this holds for d = 2, whatever the angle. So the finished tree is not a thin line but fills an area, as a solid figure does; only its outline, where the leaves meet the empty space around them, is a fractal curve.
Albert Bosman's tree
The Dutch mathematics teacher Albert E. Bosman drew the first Pythagoras tree in 1942, decades before Benoit Mandelbrot coined the word fractal. It has since become one of the standard examples of a fractal built from a simple rule, next to the Koch snowflake and the Sierpiński triangle, and a favourite exercise for drawing with a computer, because one short recursive rule draws the whole tree.
Variations
Let the triangles lean left and right in turn, using the angle and its complement on alternate levels, and the spirals unwind into a jagged, pointed crown, more like a fir than an oak. Other variations give the triangles other shapes, put rectangles instead of squares on them, or draw only lines from the middle of each square, which turns the tree into a fractal canopy. The generator lets you change the angle, the depth and the lean, colour the tree from bark to leaves and show the triangles between the squares.
The H-tree
A close relative of the Pythagoras tree is built from bars instead of squares. Draw one bar and cross each of its ends with a new bar, 1/√2 as long and centred on that end: three bars make a letter H, and repeating this at every free end gives the H-tree. Like the symmetric Pythagoras tree it doubles its pieces at every level and shrinks them by 1/√2, so it too has dimension 2: its bars never cross, and they come as close as you like to every point of a rectangle whose sides are in the ratio √2 : 1, the shape of A4 paper. Because every end lies the same distance along the bars from the middle, chip designers use the H-tree to send a clock signal to all parts of a chip at the same moment.
Explore it
Open the Pythagoras tree generator and press Play to grow the tree from its trunk, level by level. Drag the tip of the first triangle and watch the whole tree lean and curl with it, try the 3-4-5, 30-60-90 and 5-12-13 triangles, and read the total area and the size of the tree in the tiles. Switch to the H-tree to grow the tree of bars. The pencil opens the tree in the photo editor with the trunk, the branches, the leaves and the triangles on layers of their own.
Frequently asked questions
Who invented the Pythagoras tree?
The Dutch mathematics teacher Albert E. Bosman, who drew it in 1942. The name comes from the theorem of Pythagoras, whose figure of a right triangle with a square on each side is the tree's building block.
What is the area of a Pythagoras tree?
Every level of squares has the area of the trunk, so a tree of depth n has n + 1 trunks' worth of squares, and that sum grows without limit. The squares overlap, though, and the symmetric tree never leaves a box 6 trunks wide and 4 high, so the area it actually covers stays below 24 trunks.
Why does the tree curl into spirals?
Unless the angle is 45°, the two new squares differ in size. Following the larger square upwards, each step turns by the same angle and shrinks by the same factor, and repeating a turn with a constant shrink traces a logarithmic spiral.
Is the Pythagoras tree a fractal?
Yes. It is made of smaller copies of itself and has detail at every scale. Its similarity dimension is 2 for every angle, because cos² α + sin² α = 1, so it fills an area; its outline is a fractal curve.
What is an H-tree?
A fractal of bars: each bar has a new bar across each of its ends, 1/√2 as long and centred on the end, so the first three bars form a letter H. The bars never cross and fill a rectangle with sides in the ratio √2 : 1. It is used to lay out the wires that carry a clock signal through a chip, because every end is equally far from the middle.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Open the Pythagoras tree generator