The Golden Ratio
The Golden Ratio has something for everyone: children can understand its definition in terms of similarity, students who’ve studied a little algebra can use this definition to find its value in terms of square roots, and those who know a little calculus can appreciate its (perhaps surprising) relationship to the Fibonacci numbers. It’s also a nice example of an “infinite” structure which can be defined via self-reference, continued fractions, nested radicals, and recurrence relations. This makes it a nice “Grand Slam” topic in popular mathematics.
Golden Rectangles
Take any (non-square) rectangle. Draw the largest square that fits inside the rectangle, like so:
Now look at the rectangle that’s left over. If the leftover rectangle has the same shape as the original rectangle, the original rectangle is called a golden rectangle.
Actually, since both the original rectangle and the leftover rectangle are similar, they’re both golden rectangles in this case. As a result, if you now inscribe the largest square within the leftover rectangle, the leftovers of the leftovers are also a golden rectangle, and so on. You can do this indefinitely!
Calculating the Golden Ratio
The golden ratio is simply the ratio of the side lengths of a golden rectangle. Notice that in both this definition, and the definition of a golden rectangle, absolute lengths never come into play: all that matters is proportionality.
All you need to calculate the golden ratio is a little experience with quadratic equations. To start, lets name some of the lengths in a diagram of a golden rectangle:
Since absolute size doesn’t matter, we’ve chosen to depict a golden rectangle whose height is ; we’re calling its length . We’ve also shaded in the inscribed square. Because it’s a square and its height is , its width is also . This makes the width of the unshaded, leftover rectangle .
Now the defining property of a golden rectangle is that the unshaded rectangle is similar to the original rectangle. If we let and stand for the width and height of the original rectangle, and and the width and height of the smaller unshaded rectangle, then this means:
or, equivalently:
But we know the width and height of both rectangles, so we can substitute these values into the equation above and see what happens. The width and height of the original rectangle are and , so:
Turning our heads 90 degrees, it’s easy to see that the width of the unshaded rectangle is , and its height is :
Substituting these values into the original equation gives us:
Cross-multiplying gives us an equivalent equation, which we can hammer into a more convenient form:
Alright, so any golden rectangle with side lengths and has the property that . This is a quadratic equation, and quadratic equations are readily solvable using tools like the quadratic formula or completing the square:
There are two solutions, but only one makes sense given our problem (the other one is negative). This means:
We set out to calculate the ratio of the long side of a golden rectangle to its short side. And since the long side of our rectangle is and the short side is , is the golden ratio!
It’s a special number, so it gets a special name: the Greek letter :
Continued Fractions and Nested Radicals
The golden ratio involves a square root, which means it’s an irrational number. Irrational numbers are inherently infinite objects. And it turns out this infinite quality has a couple of very neat, explicit representations in the case of the golden ratio. In particular:
and, in case that isn’t spectacular enough:
How do we even make sense of a continued fraction or nested radical like the ones shown above? This requires a little bit of calculus, which we’ll get to below. But for now let’s just ignore any questions about meaningfulness and do some calculations.
The key observation is that each of these infinite, nested objects contains a copy of itself within itself. So let’s just pretend that we know that the expression:
is meaningful, i.e. that it has a well-defined value. We don’t know that value, but we can still give it a name, like :
Again, we don’t know what is, but we do know that, whatever it is, the boxed expression below must have the same value, because it’s the same expression:
But this means that:
which is the same as saying:
This is the same quadratic equation we solved earlier! So it has the same solution(s), and thus .
The same trick is used to find the value of the nested radical. In this case:
so:
and again:
A Little Calculus
We rather cavalierly assumed that the continued fraction and nested radical above are meaningful. But are they? It’s easy to concoct similar infinite objects that don’t have any well-defined value. A famous example is Grandi’s Series:
You might argue that it’s equal to 0, since:
But it also appears to be equal to 1, because:
The problem is that Grandi’s series doesn’t “settle down”.
It turns out—and this is one of the big insights behind calculus—that certain infinite objects are well-defined. This is because that, even though they “go on forever”, they change less and less the “farther out” you go.
This idea is called convergence. There’s not enough space to discuss it in detail here, but a key result is that sequences whose terms increase but are bounded above are convergent, a fact known as the monotone convergence theorem.
A little more machinery is required to justify the algebraic operations we performed, but the gist is that once you know a sequence converges, the tricks we used above are totally justified.
The Fibonacci Sequence
Finally, here’s a little exercise to try at home. On a sheet of grid paper, outline two squares next to each other. Taken together, they form a rectangle. Below them, outline a square, like so:
Taken all together, the 3 squares form a rectangle. Next to them, outline a square. These then admit a square below them, then an square next to them, then a square below them, etc.
As you continue to add squares, the rectangle formed by all of the squares together looks more and more like a golden rectangle! We can test this hypothesis with a little program:
import math
from functools import cache
@cache
def fib(n):
"""Compute the nth Fibonacci number."""
if n == 0 or n == 1:
return 1
else:
return fib(n - 1) + fib(n - 2)
phi = (1 + math.sqrt(5)) / 2
print(f"phi = {phi}")
for n in range(0, 100, 10):
print(f"fib({n + 1}) / fib({n}) = {fib(n + 1) / fib(n)}")
The sequence is called the Fibonacci Sequence. And it’s defined exactly like the construction we performed above with the grid paper. The first two values are and , and every subsequent term is the sum of the two previous terms. So the next term is , then , then , then , etc.
The grid paper rectangles above each have the property that the ratio of their side lengths is the ratio of two subsequent Fibonacci numbers: 2 to 1, then 3 to 2, then 5 to 3, 8 to 5, etc. The program above allows us to see how this ratio changes over the course of considering the first 100 or so Fibonacci numbers. And its output confirms our theory:
phi = 1.618033988749895
fib(1) / fib(0) = 1.0
fib(11) / fib(10) = 1.6179775280898876
fib(21) / fib(20) = 1.618033985017358
fib(31) / fib(30) = 1.6180339887496482
fib(41) / fib(40) = 1.618033988749895
fib(51) / fib(50) = 1.618033988749895
fib(61) / fib(60) = 1.618033988749895
fib(71) / fib(70) = 1.618033988749895
fib(81) / fib(80) = 1.618033988749895
fib(91) / fib(90) = 1.618033988749895
Just as we suspected, this ratio tends towards !
Better yet, we can prove it. We’ll first need a proper definition of the nth Fibonacci number:
We’re interested in the limit of the sequence:
As we did above, let’s just plow ahead and assume converges to some value . (The monotone convergence theorem can once again be used to show that does, in fact, converge to something.)
But “unfolding” the definition of allows us to create another sequence whose limit must be the same:
Finally, the sequence also converges to . This leaves us with the now familiar equation:
which is equivalent to:
So, as anticipated: