Mathwords logoMathwords

Continued Fraction — Definition, Formula & Examples

A continued fraction is a way of expressing a number as a whole number plus a fraction whose denominator itself contains a whole number plus a fraction, and so on. This nested structure can be finite (for rational numbers) or infinite (for irrational numbers).

A continued fraction is an expression of the form a0+1a1+1a2+1a3+a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + \cdots}}}, where a0a_0 is an integer and a1,a2,a3,a_1, a_2, a_3, \ldots are positive integers called partial quotients. Every real number has a unique continued fraction expansion (with the convention that finite expansions do not end in 1).

Key Formula

x=a0+1a1+1a2+1a3+x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + \cdots}}}
Where:
  • xx = The real number being represented
  • a0a_0 = The integer part of x (can be zero or negative)
  • a1,a2,a3,a_1, a_2, a_3, \ldots = Positive integers called partial quotients

How It Works

To find the continued fraction of a number, you repeatedly take the integer part and then invert the fractional remainder. Start with your number, write down the integer part as a0a_0, subtract it, and take the reciprocal of what remains. Repeat this process on each new value to get a1,a2,a3,a_1, a_2, a_3, \ldots. For a rational number, the process terminates after finitely many steps. For an irrational number like 2\sqrt{2}, the partial quotients continue forever, often with a repeating pattern.

Worked Example

Problem: Express the fraction 43/19 as a continued fraction.
Step 1: Divide 43 by 19. The integer part is 2 with remainder 5, so the fractional part is 5/19.
4319=2+519\frac{43}{19} = 2 + \frac{5}{19}
Step 2: Invert the fractional part to get 19/5. The integer part is 3 with remainder 4, so the fractional part is 4/5.
195=3+45\frac{19}{5} = 3 + \frac{4}{5}
Step 3: Invert 4/5 to get 5/4. The integer part is 1 with remainder 1.
54=1+14\frac{5}{4} = 1 + \frac{1}{4}
Step 4: Invert 1/4 to get 4, which is a whole number. The process terminates.
4319=2+13+11+14\frac{43}{19} = 2 + \cfrac{1}{3 + \cfrac{1}{1 + \cfrac{1}{4}}}
Answer: The continued fraction representation is [2; 3, 1, 4], meaning the partial quotients are 2, 3, 1, and 4.

Why It Matters

Continued fractions provide the best rational approximations to irrational numbers — this is how ancient astronomers computed accurate calendar ratios. They appear in number theory courses and in algorithms like the Euclidean algorithm for finding greatest common divisors.

Common Mistakes

Mistake: Forgetting to invert the fractional remainder before finding the next partial quotient.
Correction: After subtracting the integer part, always take the reciprocal of the leftover fraction before repeating the process.