About the SA Blog Network

Roots of Unity

Roots of Unity

Mathematics: learning it, doing it, celebrating it.
Roots of Unity Home

Romance, Continued Fractions, and You

The views expressed are those of the author and are not necessarily those of Scientific American.

Email   PrintPrint

A continued fraction....of love.

About a month ago, I awoke from a dream totally psyched about the brilliant blog post I would write for Valentine’s Day. In my dream, I had seen the mathematical concept of continued fractions as a metaphor for romance, and I was shocked that no one else had ever written about the beautiful, natural correspondence between the two subjects. As my brain entered the real world more fully, I realized that the correspondence isn’t all that natural and might not even be beautiful. But I won’t let that stop me! This Valentine’s Day, I’m not going to try to woo you with cardiods and heart-y Sierpinski triangles. Instead, prepare to be amazed by continued fractions, the dreamiest new way to celebrate a mathematical Valentine’s Day!

First of all, a continued fraction looks just like a fraction, but more so.

A continued fraction...of numbers.

Instead of stopping at one numerator and one denominator, like the number 1/2, the denominator contains a fraction as well. And the denominator of that fraction contains a fraction, and so on. We can have either a finite or an infinite number of entries in an expression like this. If it’s finite, it’s not too hard to see that the continued fraction represents a rational number.

A continued fraction representing the number 1 7/10.

On the other hand, if a continued fraction has an infinite number of entries, then it represents an irrational number. This is actually a big advantage for continued fractions as opposed to decimal representations of numbers. Some rational numbers, such as 1/3=.333333… and 1/7=.142857… have nonterminating (but repeating) decimal representations. Whether the decimal representation of a number terminates or not depends not only on whether the number is rational but also on how a rational number’s denominator is related to the number 10, the base of the decimal system. This is kind of arbitrary: why should the representation terminate or not based on properties of the number 10? One advantage of continued fractions is that it doesn’t have this asymmetry built in.

For the purposes of this post, we’re going to require that continued fractions only have 1′s in the numerators and positive integers in the denominators, although we’ll allow an arbitrary positive or negative integer to be added to the front. So we’re talking about expressions that look like this.

A law-abiding continued fraction.

We could write continued fractions without following those rules, but the rules make it possible for us to prove more meaningful theorems. (And isn’t that what we all want in life?)

When we follow these rules, the continued fraction representation of each number is almost unique. Each rational number actually has two continued fraction representations, but it’s for a silly reason.

Two ways of representing 1 7/10 as a continued fraction. The expression on the right is just like the expression on the left, except I replaced the number 3 with 2+1/1. We can remove this non-uniqueness by requiring that finite continued fractions don't end in a 1/1.

Each irrational number, on the other hand, has a completely unique continued fraction representation.

Continued fractions are cool because in a quantifiable way, they are the best approximations of numbers. Using decimals, we can always approximate any rational or irrational number to any degree of precision we want, so it sounds a little weird to talk about a “best” approximation of a number. But what “best” means in this context is the best approximation with a denominator that is less than or equal to a given number. If you truncate the continued fraction expansion of a number q, the rational number that you get is the closest you can get to q without having to resort to a larger denominator. For a concrete example, think about the number 0.76. It can be approximated to the nearest fourth by 3/4=0.75 or to the nearest fifth by 4/5=0.8. The error is smaller when approximating to the nearest fourth so 4/5 is not a best approximation.

Within this framework of best approximations, there are better and worse best approximations. This is getting pretty meta, but the general idea is that for some numbers, the error at each successive level of the continued fraction is worse than for other numbers. The worst number, in this sense, is the golden ratio, also known as φ or (1+√5)⁄2.

φ isn't bad. It's just approximated that way.

To put this another way, the very best possible approximations of φ are as bad as best approximations can possibly be.

Some people use the term “badly approximable” to describe numbers like φ. Fewer people use the term “well approximable” to describe the other continued fractions, but I like it. We shouldn’t label some numbers “bad” without showing them how to be “good.” How else will they learn?

It’s no coincidence that the continued fraction for φ, the worst approximable number, is just a bunch of ones. It turns out that you can just look at the denominators in a continued fraction to figure out whether numbers are badly approximable or not. In general, large denominators mean better approximations than small denominators. If the denominators of the continued fraction representation of a number q are all bounded by some number, then q is badly appoximable. But if the denominators get arbitrarily large, the number is well approximable. For example, the number e, which shows up when we calculate how much interest we’ll earn on an investment, is well approximable.

The continued fraction expansion of e. Mathematicians who don't like fun (or wasting space unnecessarily) would abbreviate this by just writing out the sequence of denominators, so they would represent e as (2;1,2,1,1,4,1,1,6,1,1,8,1,1,10…). This is a little more boring but much more space-efficient than the way I wrote it.

Note that the denominators don’t have to grow at each step, but there does need to be some subset of the denominators that grows boundlessly. In the case of e, there is a subsequence that goes 2, 4, 6, 8, and so on.

Continued fractions have some other cool properties, but they’re still mysterious in some ways. The continued fraction expansion of the square root of an integer (that isn’t a perfect square) always repeats. Note that this means that square roots are all badly approximable: if they repeat, their terms can’t get bigger and bigger.

The continued fraction expansion of √3.

But not much is known about the continued fraction representations of some other pretty easy to describe numbers such as the cube root of 2 and π. Are they badly or well approximable? Besides square roots, what other classes of numbers are badly approximable? These questions are easy to ask but actually pretty challenging to answer. The reference I used for this post, the 1964 edition of an excellent book by Aleksandr Khinchin, mentioned many of these open questions, and 50 years later, most of them are still unanswered.

So what does this all have to do with romance? Well, as was obvious to my subconscious, it’s completely natural to imagine that each day your love for your partner (or your infatuation with your secret crush) is a denominator in a continued fraction representing your relationship. A summer fling might be a rational number with a relatively small denominator, and an on-again, off-again romance might be a square root. If yours is the golden ratio, it might be time to end things already. But if everything is going right, then maybe you’re one of the lucky ones with a well approximable irrational number.

Confidential to my husband: my love for you is like the denominators of the continued fraction representation of a very well approximable irrational number: growing without bound, no subsequences required.

Evelyn Lamb About the Author: Evelyn Lamb is a postdoc at the University of Utah. She writes about mathematics and other cool stuff. Follow on Twitter @evelynjlamb.

The views expressed are those of the author and are not necessarily those of Scientific American.

Previous: What Are Roots of Unity? More
Roots of Unity
Next: Joint Math Meetings Wrap-Up

Rights & Permissions

Comments 4 Comments

Add Comment
  1. 1. M Tucker 2:23 pm 02/14/2013

    Evelyn, this is a very sweet post. You are a wonderful teacher! I hope your hubby sees this and you both have a great Valentine’s Day.

    Link to this
  2. 2. dadster 7:53 am 02/15/2013

    Wonderful Evelyn !there ought to be more lady reasrchers like you to see the romance of mathematics which is missed out in the sheer logic of it .

    By the way have you read in detail an Indian mathematician by name Ramanujam , another romantic continued fractionist ?

    Some one had written a book on him romantically titled “The Man Who Knew Infinity” , though I would have it titled it, ” The Man Who Romanced With Mathematics ” on a valentine day .

    Link to this
  3. 3. Evelyn Lamb in reply to Evelyn Lamb 12:44 pm 02/15/2013

    I’m glad you liked the article, but I’m uncomfortable with the idea that being a lady makes me more romantic and less logical than males. I’m hoping your comment to that effect was tongue-in-cheek. As you have observed, male mathematicians like Ramanujan are also often “romantic” in their approach to mathematics! I just attended a talk today about Paul Dirac’s “religion of mathematical beauty.” (That is not the session I attended; it’s a similar talk, but I haven’t watched the whole video.)
    I see the “romantic” side of continued fractions because I’m a creative, weird person, not because I’m female and therefore illogical. :)

    Link to this
  4. 4. kflorek 5:14 pm 03/27/2013

    You write some of the clearest, and fun, expositions I have ever seen on some logically convoluted mathematics.

    I don’t think women are illogical. However I have seen women do things instantaneously, which I would have to plod through methodically. A group of us relatives were at a cemetery that I happened to know, so I gave directions. There were a lot of turns. We passed the plot of a another relative on our way to the current destination. Later, we wanted to go back to the grave we had passed by. I could not figure the intricate way back, which was my job, other than to exit the cemetery and start over. The woman of the group said, “We made all right turns, so we just have to make all lefts on the way back.” I was agog. I had spent my entire life to that point without seeing this interesting, real-life item of topology. I don’t think I could explain the mathematical reason for it though.

    Link to this

Add a Comment
You must sign in or register as a member to submit a comment.

More from Scientific American

Email this Article