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

QR Algorithm

Graduate Depth 86 in the knowledge graph ☐ I know this ☆ Set as goal
351prerequisites beneath it
See this on the map →
Power Method for Eigenvalues→
qr-algorithm eigenvalues qr-decomposition

Core Idea

The QR algorithm iteratively computes QR decomposition A_k = Q_k R_k and sets A_{k+1} = R_k Q_k, creating a sequence similar to A_k. This sequence converges to a Schur form (upper triangular for real matrices), revealing all eigenvalues on the diagonal. The QR algorithm is highly efficient, stable, and the foundation of modern eigenvalue solvers.

Explainer

The power method you already know is conceptually elegant: multiply by A repeatedly, normalize, and converge to the dominant eigenvector. But it has a critical limitation — it finds only the largest eigenvalue. If you want all eigenvalues of a matrix, you need a different strategy. The QR algorithm applies a sequence of similarity transformations to the entire matrix until it converges to a form that reveals all eigenvalues at once.

The algorithm's core iteration is: factor A_k = Q_k R_k (QR decomposition: Q orthogonal, R upper triangular), then set A_{k+1} = R_k Q_k (swap the factors). Notice that A_{k+1} = R_k Q_k = Q_kT A_k Q_k, since A_k = Q_k R_k implies R_k = Q_kT A_k. So A_{k+1} is *similar* to A_k — they have identical eigenvalues, just in a different basis. The sequence A₀, A₁, A₂, ... all share the same eigenvalues. What changes is the structure: off-diagonal entries diminish, and the sequence converges to an upper triangular (Schur) form with eigenvalues on the diagonal.

Why does convergence happen? The intuition connects directly to the power method. Each QR iteration implicitly runs the power method on multiple invariant subspaces simultaneously. The subspace spanned by the first k columns of Q₁Q₂···Qₙ converges toward the invariant subspace corresponding to the k largest eigenvalues (by magnitude). The QR factorization is the mechanism for extracting this subspace information orthogonally at every step — think of it as running the power method on all eigenspaces at once while keeping them orthogonal to each other.

In practice, two refinements make the algorithm efficient. First, reduce A to Hessenberg form (upper triangular plus one subdiagonal) before iteration; this makes each QR factorization cost O(n²) instead of O(n³). Second, introduce shifts: apply QR to (A_k − σI) where σ is chosen to approximate an eigenvalue (e.g., the bottom-right entry). Shifts accelerate convergence from linear to cubic near the end of each deflation step. With both refinements, the QR algorithm finds all eigenvalues of an n×n matrix in O(n³) operations with excellent numerical stability — it is the algorithm behind the `eig` function in every numerical computing environment.

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 → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Vectors in Two Dimensions → Vector Operations: Addition, Subtraction, and Scalar Multiplication → Dot Product (Inner Product in R^n) → Matrix Multiplication → Determinants of 2×2 and 3×3 Matrices → Invertible Matrices and Matrix Inverses → Systems of Linear Equations and Matrix Form → Gaussian Elimination and Row Reduction → Row Echelon Form and Back Substitution → The Standard Matrix of a Linear Transformation → Eigenvalues and Eigenvectors → Power Method for Eigenvalues → QR Algorithm

Longest path: 87 steps · 351 total prerequisite topics

Prerequisites (1)

Leads To (0)

No topics depend on this one yet.