Numbers can be expressed in several different ways. We are familiar with whole numbers, fractions and decimals. But there is a wide range of other forms, and we examine one of them in this article. Every rational number can be expanded as a continued fraction:

where all are integers, all positive except perhaps . If we add it to ; then the expansion is unique.

For an irrational number, the expansion continues indefinitely:

and this expansion is unique.

**Construction of the Expansion**

For any number , it is a simple matter to write down the continued fraction expansion.

- Subtract from its integer part (technically the floor, ).
- This is the first term, .
- Invert the remainder: .
- The denominator is a positive number greater than . Repeat steps 1 to 3 for this quantity.

Rational numbers have expansions that terminate after a finite number of terms. Irrational ones continue infinitely.

A simple example makes the expansion process clear. The basic approximation of is . A much more accurate approximation is

which gives six decimal places of accuracy:

The (irrational) golden number has the expansion

This is easily shown by means of the quadratic equation of which is one solution. We use the equation to write

which may be continued indefinitely, yielding the expression above.

**Some Advantages**

- The continued fraction representation of a rational number is always finite. This contrasts with the usual decimal expansion, where has the finite expression but has the infinite one .
- The continued fraction for an irrational number is always infinite.
- The continued fraction expansion is essentially unique. The only condition is that for a rational number we must have .
- The successive approximations obtained by truncating the continued fraction expansion are the best possible approximations for a given size of the denominator.

The approximation for is excellent, because the first term omitted has denominator making the error very small. In contrast, the denominators in the expansion of the golden number are all unity, so that the truncated expansions converge very slowly. In a sense, the golden number is the “most irrational” number. The convergents are ratios of Fibonacci numbers:

**Conclusion**

Continued fractions are useful in many contexts. For example, the Lanczos algorithm used to approximate the eigenvalues and eigenvectors of large sparse matrices uses these expansions. Continued fractions are also a favourite subject in recreational mathematics.

This brief note barely scratches the surface of the subject. The wikipedia article on continued fractions is a particularly good source of information.

**Notice**

Booking is now open for an evening course at University College Dublin, *Sum-enchanted Evenings, *to be given by Peter Lynch. Book online at __www.ucd.ie/all/study__ or by phone (01 7167123).