Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Power Iteration


Multiply by A, rescale, repeat: the scale factor converges to the dominant eigenvalue and the vector to its eigenvector.

Preset?Multiplying a vector by A again and again stretches it most along the eigenvector with the largest |λ|, because that component grows fastest. Rescaling after each product keeps the numbers tame; the scale factor itself converges to the dominant eigenvalue and the vector to its eigenvector. The error shrinks by |λ₂/λ₁| per step, so a close second eigenvalue means slow convergence, and a tie means none.
Size and steps
A2× 2steps6
Entries of A
Start vector x₀
A2×2
4
1
2
3
x₀
1
0
Step 1 / 8

Step explanations

1Power iteration on a 2×2 matrix
Start from x₀ = (1, 0). Each step multiplies by A, reads off the entry of largest magnitude as the current estimate of the dominant eigenvalue, and divides by it so the largest entry is 1 again. Repeated multiplication amplifies the eigenvector component with the largest |λ| fastest, so the vector swings toward that eigenvector and the scale factor toward that eigenvalue. 6 steps follow.
Any start with a component along the dominant eigenvector will do. Learn more about the start · why it works








Key Terms

Power iteration (power method) — the loop xk+1=Axk/sk\mathbf{x}_{k+1} = A\mathbf{x}_k / s_k, which converges to the eigenvector of the eigenvalue of largest modulus.

Dominant eigenvalue — the eigenvalue λ1\lambda_1 with the largest absolute value; it must be strictly larger in modulus than every other for the method to converge.

Scale factor — the number sks_k divided out at each step; here the entry of AxkA\mathbf{x}_k with the largest magnitude, which tends to λ1\lambda_1.

Normalization — rescaling so the largest entry is 11, keeping the numbers from overflowing or vanishing.

Convergence ratioλ2/λ1|\lambda_2 / \lambda_1|, the factor by which the error shrinks per step.

Rayleigh quotientxTAx/xTx\mathbf{x}^TA\mathbf{x} / \mathbf{x}^T\mathbf{x}, a more accurate eigenvalue estimate for symmetric matrices, not used by the tool.

Tie — two eigenvalues of equal largest modulus, such as ±1\pm 1 or a complex pair; the iteration then oscillates instead of converging.

Inverse and shifted iteration — applying the same loop to A1A^{-1} or (AsI)1(A - sI)^{-1} to find the smallest eigenvalue or one near ss.

Getting Started with the Visualizer

Choose a matrix and a starting vector, then watch the estimates converge, or fail to.

• Use the Preset pills for seven matrices: a classic fast case, a faster one, a slow one, a negative dominant eigenvalue, a 3×33 \times 3, a tie between 11 and 1-1, and a rotation with complex eigenvalues
• Use the Size stepper for 2×22 \times 2 or 3×33 \times 3, and the steps stepper for how many iterations to run, from one to fifteen
• Edit the entries of AA or of the start vector directly, or press Shuffle for a random matrix with small integer eigenvalues
• Hover the ? icon for a reminder of why repeated multiplication finds the dominant eigenvector
• Press play or step manually; the step log on the right keeps every estimate

The final scene compares the last estimate with the exact dominant eigenvalue from the characteristic polynomial, reports the error, and gives the convergence ratio λ2/λ1|\lambda_2 / \lambda_1| that explains how fast the estimates moved.

The Loop

Every step is the same three moves.

Multiplyy=Axk\mathbf{y} = A\mathbf{x}_k
Read the estimateλk+1\lambda_{k+1} is the entry of y\mathbf{y} with the largest magnitude, sign included; since xk\mathbf{x}_k has largest entry 11, that entry of y\mathbf{y} is what AA did to it
Rescalexk+1=y/λk+1\mathbf{x}_{k+1} = \mathbf{y} / \lambda_{k+1}, so the largest entry is 11 again

The caption of each step reports the change in the estimate and the largest change in any entry of the vector, so convergence is visible as those numbers shrink. The tool notes when the estimate has stopped moving to four decimals.

If AxkA\mathbf{x}_k ever comes out zero, xk\mathbf{x}_k was in the null space and the run stops with a request for a different start.

The Starting Point

The method needs nothing but AA and a start vector. The frozen picture below shows the default preset's AA beside x0=(1,0)\mathbf{x}_0 = (1, 0), already scaled so its largest entry is 11.

Almost any start works; the only bad choice is one with no component along the dominant eigenvector.
A2×24123x₀10
Starting point, frozen

The default preset A = [4, 1; 2, 3] with x₀ = (1, 0), already scaled so its largest entry is 1. Eigenvalues 5 and 2; the dominant eigenvector is (1, 1).

The start vector's expansion in eigenvectors is what the whole method is about, even though it is never computed. Here (1,0)=23(1,1)+13(1,2)(1, 0) = \tfrac{2}{3}(1, 1) + \tfrac{1}{3}(1, -2), and the first component will be multiplied by 55 each step while the second is multiplied by 22. After kk steps their ratio has changed by (2/5)k(2/5)^k, and that is exactly how fast the vector turns toward (1,1)(1, 1).

The tool rescales whatever you enter so its largest entry is 11, purely for readability; scaling the start changes nothing about the iterates' directions.

The First Step

The frozen picture below shows the first step on the default preset: Ax0=(4,2)A\mathbf{x}_0 = (4, 2), the entry 44 marked as the estimate, and the rescaled x1=(1,0.5)\mathbf{x}_1 = (1, 0.5).

One multiplication has already moved the vector a third of the way from (1,0)(1, 0) toward (1,1)(1, 1).
A2×24123x₀10=A x₀42x₁10.5
First step, frozen

A x₀ = (4, 2). The entry 4 is the first estimate, and dividing by it gives x₁ = (1, 0.5) - already a third of the way toward (1, 1).

The estimate 44 is the first entry of Ax0A\mathbf{x}_0, and it is what AA did to the entry that was 11. It is not yet the eigenvalue because x0\mathbf{x}_0 is not yet an eigenvector; the estimate only becomes exact when the vector stops changing, since then Ax=sxA\mathbf{x} = s\mathbf{x} is the eigenvector equation itself.

The choice of the largest entry as scale factor is one of several conventions. Dividing by the Euclidean length is equally common and gives a unit vector; the eigenvalue is then read from the Rayleigh quotient rather than from a single entry.

Closing In

The frozen picture below is the third step: Ax2=(4.7778,4.3333)A\mathbf{x}_2 = (4.7778, 4.3333), estimate 4.77784.7778, and x3=(1,0.9070)\mathbf{x}_3 = (1, 0.9070).

The estimate's error has gone 1,0.5,0.221, 0.5, 0.22, each step multiplying it by about 0.40.4, the ratio 2/52/5 of the two eigenvalues.
A2×24123x₂10.7778=A x₂4.77784.3333x₃10.907
Third step, frozen

A x₂ = (4.7778, 4.3333), estimate 4.7778, x₃ = (1, 0.9070). The errors 1, 0.5, 0.22 shrink by about 0.4 per step, the ratio 2/5 of the eigenvalues.

This geometric shrinking is the signature of the power method, and it is also its limitation. The rate is fixed by the matrix, not by the algorithm; nothing in the loop can speed it up. When the ratio is 0.40.4, four decimals cost about a dozen steps. When it is 0.90.9, they cost about ninety.

The remedies all change the matrix rather than the loop: shifting to AsIA - sI to shrink the ratio, or inverting to (AsI)1(A - sI)^{-1} so that the eigenvalue nearest ss becomes overwhelmingly dominant.

Converged

After six steps the frozen picture below shows x6=(1,0.9939)\mathbf{x}_6 = (1, 0.9939) beside the exact eigenvector (1,1)(1, 1), with the estimate at 4.98474.9847 against the true 55.

Not yet four decimals, but the final scene reports the error and the ratio, so the number of further steps needed is predictable.
A2×24123x₆10.9939exact v11
After six steps, frozen

x₆ = (1, 0.9939) beside the exact eigenvector (1, 1); estimate 4.9847 against the true 5, an error of 0.015 that six more steps would cut below 0.0001.

The exact values in the final scene come from the characteristic polynomial, which the tool computes only for the comparison; the method itself never needs it. That is the point: for a 2×22 \times 2 the polynomial is easier, but for a matrix with a million rows there is no polynomial to solve, and the loop of matrix-vector products is all there is.

The comparison also shows what the method delivers: one eigenvalue and one eigenvector, with an accuracy you choose by the number of steps.

When Convergence Is Slow

The slow preset has eigenvalues 1010 and 99. The frozen picture below shows its sixth step: the estimate is still around 9.69.6 and the vector is nowhere near the eigenvector (1,1)(1, 1).

With ratio 0.90.9, each step removes only a tenth of the remaining error.
A2×29.50.50.59.5x₅10.2575=A x₅9.62872.946x₆10.306
Slow convergence, frozen

The slow preset [9.5, 0.5; 0.5, 9.5] at its sixth step: eigenvalues 10 and 9, ratio 0.9, estimate still around 9.6 and the vector far from (1, 1). Each step removes only a tenth of the error.

The two eigenvectors of this matrix are (1,1)(1, 1) and (1,1)(1, -1), and the start (1,0)(1, 0) is exactly halfway between them. Since 9/109/10 is close to 11, the unwanted component decays very slowly, and it takes about 2222 steps to get the estimate within 0.10.1 of 1010 and about 6565 to get within 0.0010.001.

Shifting fixes it. Iterating on A8IA - 8I, with eigenvalues 22 and 11, has ratio 0.50.5; iterating on (A9.9I)1(A - 9.9I)^{-1}, with eigenvalues 1010 and 1.11-1.11, has ratio 0.110.11 and converges in a handful of steps. Choosing the shift is the art of the method.

When There Is No Dominant Eigenvalue

The tie preset is the swap matrix (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} with eigenvalues 11 and 1-1. The frozen picture below shows its verdict: the vector alternates between (1,0)(1, 0) and (0,1)(0, 1) and never settles.

Both eigenvalues have modulus 11, so neither component outgrows the other.
A2×20110x₆10exact v11
No dominant eigenvalue, frozen

The swap matrix with eigenvalues 1 and −1: the vector alternates between (1, 0) and (0, 1) forever. Equal moduli mean nothing decays, so nothing converges.

The rotation preset fails the same way for a different reason: its eigenvalues are ±i\pm i, complex, again with equal modulus. The vector turns a quarter circle each step and the estimate flips between 11 and 1-1.

In both cases the fix is a shift. The swap matrix shifted to A+0.5IA + 0.5I has eigenvalues 1.51.5 and 0.5-0.5, ratio 1/31/3, and converges at once to (1,1)(1, 1). A real matrix with a dominant complex pair cannot be fixed by a real shift; the two-dimensional invariant plane is what the iteration actually finds, and the block power method or the QR algorithm is the tool for it.

Reading the Scene Player

Each step shows the same four objects left to right.

AA, then the current vector xk\mathbf{x}_k in muted grey
• The product AxkA\mathbf{x}_k, with the entry of largest magnitude in accent: it is the new eigenvalue estimate
• The rescaled xk+1\mathbf{x}_{k+1} in primary blue, with an arrow from the accent entry to the 11 it became
• In the final scene, the last vector beside the exact eigenvector, scaled the same way, as the target

A vector that stops changing and an estimate that stops moving mean convergence. A vector whose entries keep swapping or an estimate that alternates in sign mean a tie or a complex pair, and the final scene says which.

Choosing a Matrix

The seven presets each make a different point.

Classic — eigenvalues 55 and 22, ratio 0.40.4; the estimates 4,4.5,4.78,4.91,4.96,4.984, 4.5, 4.78, 4.91, 4.96, 4.98 approach 55 from below
Fast — eigenvalues 99 and 11, ratio 0.110.11; nearly a digit per step
Slow — eigenvalues 1010 and 99, ratio 0.90.9; after six steps the estimate is still far from 1010, and it takes dozens of steps to settle
Negative dominant — eigenvalues 3-3 and 22; the signed scale factor keeps the vector steady while the estimate converges to 3-3
3×33 \times 3 — eigenvalues 1111, 22, 11, ratio 2/112/11; the same matrix as the eigenvalue tool's default
Tie ±1\pm 1 — the swap matrix, with eigenvalues 11 and 1-1; the vector alternates between two directions forever
Rotation — complex eigenvalues ±i\pm i; the vector rotates and the estimate flips sign each step

Shuffle produces integer matrices with small integer eigenvalues; some will have ties, and the final scene will say so.

Why It Works

Suppose AA has eigenvalues λ1>λ2λn|\lambda_1| > |\lambda_2| \geq \cdots \geq |\lambda_n| with eigenvectors v1,,vn\mathbf{v}_1, \ldots, \mathbf{v}_n, and expand the start vector in that basis:

x0=c1v1+c2v2++cnvn\mathbf{x}_0 = c_1\mathbf{v}_1 + c_2\mathbf{v}_2 + \cdots + c_n\mathbf{v}_n


Each multiplication by AA scales each component by its eigenvalue, so

Akx0=c1λ1kv1+c2λ2kv2+=λ1k(c1v1+c2(λ2λ1)kv2+)A^k\mathbf{x}_0 = c_1\lambda_1^k\mathbf{v}_1 + c_2\lambda_2^k\mathbf{v}_2 + \cdots = \lambda_1^k\left(c_1\mathbf{v}_1 + c_2\left(\tfrac{\lambda_2}{\lambda_1}\right)^k\mathbf{v}_2 + \cdots\right)


Every ratio λi/λ1\lambda_i / \lambda_1 has modulus below 11, so all the other components die out geometrically and Akx0A^k\mathbf{x}_0 lines up with v1\mathbf{v}_1. The slowest to die is the v2\mathbf{v}_2 component, shrinking by λ2/λ1|\lambda_2 / \lambda_1| per step; that ratio is the convergence rate.

Rescaling changes nothing about the direction and keeps the entries readable. Once xk\mathbf{x}_k is close to v1\mathbf{v}_1, Axkλ1xkA\mathbf{x}_k \approx \lambda_1\mathbf{x}_k, so the entry that was 11 becomes λ1\lambda_1: the scale factor is the eigenvalue estimate.

Two things can go wrong. If c1=0c_1 = 0, the start has no v1\mathbf{v}_1 component and the iteration converges to the next eigenvector instead; rounding error usually rescues it, but slowly. And if λ2=λ1|\lambda_2| = |\lambda_1|, nothing dies out, and the vector oscillates between the two directions. For the theory, see the eigenvalues overview and the diagonalization page.

Key Properties

Facts about the method.

Converges when a single eigenvalue has strictly largest modulus and the start vector has a component along its eigenvector
Rate is linear with factor λ2/λ1|\lambda_2 / \lambda_1|: the error roughly multiplies by that ratio every step
Finds only the dominant pair; other eigenvalues need inverse iteration, shifts, or deflation
Negative dominant eigenvalue is fine when the scale factor keeps its sign; with an absolute-value normalization the vector would flip each step
Symmetric matrices converge in the eigenvalue estimate twice as fast if the Rayleigh quotient is used, with error λ2/λ12k|\lambda_2 / \lambda_1|^{2k}
Cost per step is one matrix-vector product, which is why it scales to enormous sparse matrices
Inverse iteration on (AsI)1(A - sI)^{-1} finds the eigenvalue nearest ss, and converges fast when ss is a good guess
Does not need the characteristic polynomial, a determinant, or any factorization of AA

Why It Matters

Power iteration is the eigenvalue method that scales.

PageRank is the dominant eigenvector of the web's link matrix, computed by exactly this loop over billions of pages
Markov chains reach their steady state by power iteration on the transition matrix; the eigenvalue is 11 and the vector is the stationary distribution
Spectral radius estimates, which decide whether an iterative solver converges or a dynamical system is stable, come from the dominant eigenvalue
Principal components: the first principal direction is the dominant eigenvector of the covariance matrix, and power iteration is the basic way to get it without forming everything
Sparse and matrix-free problems, where AA is only available as a function that multiplies vectors, admit no factorization; iteration is the only option
Foundation for better methods: inverse iteration, the QR algorithm, and Lanczos and Arnoldi are all refinements of the same idea

Worked Example

Take the default preset,

A=(4123),x0=(10)A = \begin{pmatrix} 4 & 1 \\ 2 & 3 \end{pmatrix}, \qquad \mathbf{x}_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}


The eigenvalues are 55 and 22, from λ27λ+10=0\lambda^2 - 7\lambda + 10 = 0, with dominant eigenvector (1,1)(1, 1).

Step 1. Ax0=(4,2)A\mathbf{x}_0 = (4, 2). Largest entry 44, so λ14\lambda_1 \approx 4 and x1=(1,0.5)\mathbf{x}_1 = (1, 0.5).

Step 2. Ax1=(4.5,3.5)A\mathbf{x}_1 = (4.5, 3.5). Estimate 4.54.5, x2=(1,0.7778)\mathbf{x}_2 = (1, 0.7778).

Step 3. Ax2=(4.7778,4.3333)A\mathbf{x}_2 = (4.7778, 4.3333). Estimate 4.77784.7778, x3=(1,0.9070)\mathbf{x}_3 = (1, 0.9070).

Step 4. Ax3=(4.9070,4.7209)A\mathbf{x}_3 = (4.9070, 4.7209). Estimate 4.90704.9070, x4=(1,0.9621)\mathbf{x}_4 = (1, 0.9621).

Step 5. Ax4=(4.9621,4.8863)A\mathbf{x}_4 = (4.9621, 4.8863). Estimate 4.96214.9621, x5=(1,0.9847)\mathbf{x}_5 = (1, 0.9847).

Step 6. Ax5=(4.9847,4.9542)A\mathbf{x}_5 = (4.9847, 4.9542). Estimate 4.98474.9847, x6=(1,0.9939)\mathbf{x}_6 = (1, 0.9939).

The errors in the estimate are 1,0.5,0.22,0.093,0.038,0.0151, 0.5, 0.22, 0.093, 0.038, 0.015; each is about 0.40.4 times the one before, matching λ2/λ1=2/5|\lambda_2 / \lambda_1| = 2/5. The vector's second entry closes on 11 at the same rate. Six more steps would bring the estimate within 0.00010.0001 of 55.

Common Mistakes

A few mistakes recur.

Skipping the rescaling — the direction still converges, but the entries grow like λ1k\lambda_1^k and soon overflow, or shrink to nothing if λ1<1|\lambda_1| < 1
Normalizing by absolute value with a negative eigenvalue — the vector then flips sign every step and looks like it is not converging; keep the sign of the scale factor
Reading a tie as slow convergence — if the estimates alternate between two values forever, two eigenvalues share the largest modulus; more steps will not help
Starting on a wrong eigenvector — a start vector that is exactly an eigenvector for a smaller eigenvalue stays there; the classic preset with x0=(1,1)\mathbf{x}_0 = (1, 1) would "converge" in one step only because (1,1)(1, 1) is already the dominant eigenvector
Expecting all eigenvalues — the method gives one pair; the others need shifts, inverse iteration, or deflation
Trusting few steps with a small ratio gap — when λ2|\lambda_2| is close to λ1|\lambda_1| the estimate creeps; the slow preset is still 0.40.4 away from its eigenvalue after six steps