A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Continued Fractions

Graduate Depth 76 in the knowledge graph ☐ I know this ☆ Set as goal
7topics build on this
357prerequisites beneath it
See this on the map →
The Euclidean Algorithm→→Best Rational ApproximationsPell's Equation+1 more
continued-fractions approximation irrationals

Core Idea

Every real number has a unique continued fraction expansion [a_0; a_1, a_2, ...]. Rational expansions terminate; quadratic irrationals become periodic. The convergents give best rational approximations in a precise sense.

Explainer

You already know the Euclidean algorithm: given two integers a and b, you repeatedly divide to find remainders until you hit zero, yielding gcd(a, b). A continued fraction is what happens when you keep track of those quotients as a structured expression. For example, computing gcd(355, 113) produces quotients 3, 7, 16 — and the continued fraction [3; 7, 16] = 3 + 1/(7 + 1/16) = 355/113, one of the famous approximations to π. The Euclidean algorithm and continued fractions are two faces of the same process.

To expand a real number x into a continued fraction, take the integer part a₀ = ⌊x⌋, then take the reciprocal of the remainder and repeat: a₁ = ⌊1/(x − a₀)⌋, and so on. This produces [a₀; a₁, a₂, ...] where every aᵢ is a positive integer (except possibly a₀, which can be any integer). For a rational number, the process terminates in finitely many steps — exactly as the Euclidean algorithm halts when the remainder reaches zero. For an irrational number, the expansion never terminates and gives an infinite sequence of partial quotients.

The special behavior of quadratic irrationals — numbers of the form (p + √q)/r — is one of the striking theorems: their continued fraction expansions are eventually periodic. The most famous example is √2 = [1; 2, 2, 2, ...], a purely repeating expansion. By contrast, the expansions for e and π are not periodic (they cannot be quadratic irrationals), though they have their own fascinating patterns. Periodicity links continued fractions to Pell's equation, which this topic builds toward.

The convergents pₙ/qₙ are the rational numbers you get by truncating the expansion at each step: p₀/q₀ = a₀, p₁/q₁ = a₀ + 1/a₁, and so on. These are not just random approximations — they are the *best* rational approximations to x in a precise sense: no fraction with a smaller denominator lies closer to x. This is why 355/113 (accurate to 6 decimal places) is so remarkable for approximating π; its convergent status means no fraction with denominator ≤ 113 does better. The theory of continued fractions thus transforms the problem of rational approximation into a systematic algorithm, connecting number theory to analysis through the machinery you have already built with the Euclidean algorithm.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Set Operations: Union, Intersection, and Complement → Proof by Cases → Proving by Cases and Exhaustion → Vacuous Truth and Trivial Cases → Proof by Cases (Proof by Exhaustion) → Mathematical Induction → Divisibility and Greatest Common Divisor → The Euclidean Algorithm → Continued Fractions

Longest path: 77 steps · 357 total prerequisite topics

Prerequisites (1)

Leads To (3)