Numerical Linear Algebra Tool

Power Iteration Simulator

Find the dominant eigenvalue and corresponding eigenvector of a square matrix. Explore each iteration, normalization, convergence behavior, and numerical accuracy interactively.

Interactive Calculator

Configure Your Matrix

Enter a square matrix and an initial vector.

Free Calculator
Enter one row per line. Separate elements with spaces or commas. Matrices from 1×1 to 8×8 are supported.
Enter one number for each matrix row.

Try an example matrix

Power iteration formula \[ x_{k+1}=\frac{Ax_k}{\|Ax_k\|} \]

Repeated multiplication and normalization drive the vector toward the dominant eigendirection, under appropriate convergence conditions.

Calculation Results

Calculation complete
Dominant eigenvalue estimate
—
Iterations performed
—
Eigenvector residual
—
Estimated spectral radius
—

Dominant Eigenvector

The normalized vector approximating the dominant eigendirection. Its sign may be reversed without changing the eigendirection.

Matrix and Eigenvalue Relationship

The estimated eigenpair satisfies the approximate relationship \(Av \approx \lambda v\).

Matrix-vector product Av
Estimated λv
Rayleigh quotient

Convergence Visualization

Track how the estimated eigenvalue changes during successive iterations.

The horizontal axis represents the iteration number. The vertical axis represents the Rayleigh quotient estimate.

Iteration History

Each row shows the eigenvalue estimate, residual, and vector change calculated at that iteration.

Iteration Eigenvalue estimate Residual Vector change

Step-by-Step Calculation

Mathematical Background

What Is Power Iteration?

Power iteration, also known as the power method, is an iterative numerical algorithm used in linear algebra to estimate the eigenvalue with the largest absolute value of a square matrix and its corresponding eigenvector.

Rather than calculating the characteristic polynomial and solving for all eigenvalues, the method repeatedly multiplies an initial vector by the matrix. After each multiplication, the resulting vector is normalized to prevent its magnitude from growing excessively or becoming too small.

1. Start with an initial vector

Given an \(n \times n\) matrix \(A\), select a nonzero initial vector \(x_0\). The initial vector should have a nonzero component in the direction of the dominant eigenvector.

\[ x_0 = \begin{bmatrix} 1\\ 1 \end{bmatrix} \]

2. Multiply by the matrix

Calculate the product of the matrix and the current vector:

\[ y_{k+1}=Ax_k \]

This multiplication changes the vector's direction and magnitude. Repeated multiplication tends to amplify the component associated with an eigenvalue of greatest absolute magnitude.

3. Normalize the resulting vector

Divide the new vector by its norm:

\[ x_{k+1}=\frac{y_{k+1}}{\|y_{k+1}\|_2} \]

This calculator supports both Euclidean normalization and infinity-norm normalization.

4. Estimate the dominant eigenvalue

Once an approximate eigenvector is available, the Rayleigh quotient can be used to estimate its corresponding eigenvalue:

\[ \lambda_k= \frac{x_k^T A x_k}{x_k^T x_k} \]

The Rayleigh quotient is particularly useful for real symmetric matrices. For a general real matrix, it is an estimate and should be interpreted together with the residual.

5. Check convergence

The eigenpair approximation can be evaluated using the residual:

\[ r_k=\|Ax_k-\lambda_k x_k\|_2 \]

A small residual indicates that the estimated vector and eigenvalue approximately satisfy the eigenvalue equation. The simulator also allows you to use the change in the eigenvector or the change in the eigenvalue as a stopping criterion.

Worked Example: A 2×2 Matrix

Consider the matrix:

\[ A= \begin{bmatrix} 4 & 1\\ 2 & 3 \end{bmatrix} \]

Choose the initial vector:

\[ x_0= \begin{bmatrix} 1\\ 1 \end{bmatrix} \]

The first multiplication gives:

\[ Ax_0= \begin{bmatrix} 4 & 1\\ 2 & 3 \end{bmatrix} \begin{bmatrix} 1\\ 1 \end{bmatrix} = \begin{bmatrix} 5\\ 5 \end{bmatrix} \]

Using Euclidean normalization:

\[ x_1= \frac{1}{\sqrt{50}} \begin{bmatrix} 5\\ 5 \end{bmatrix} = \begin{bmatrix} 0.707107\\ 0.707107 \end{bmatrix} \]

This matrix has eigenvalues 5 and 2. The dominant eigenvalue is therefore 5, with a corresponding eigenvector proportional to:

\[ v= \begin{bmatrix} 1\\ 1 \end{bmatrix} \]

In this example, the initial vector already points in the dominant eigendirection, so the method identifies the eigenvalue immediately.

When Does Power Iteration Converge?

A common sufficient condition for standard power iteration to converge in direction is that the matrix has a unique eigenvalue of largest absolute magnitude, and that the initial vector has a nonzero component along its corresponding eigenvector.

If the eigenvalues are ordered by magnitude as \(|\lambda_1| > |\lambda_2| \geq \cdots\), the dominant eigendirection generally becomes more prominent with each iteration.

\[ \left|\frac{\lambda_2}{\lambda_1}\right| < 1 \]

A smaller ratio generally means faster convergence, while eigenvalues with similar magnitudes can make convergence slow.

Important limitations

A small residual is a useful numerical check, but it does not by itself prove that the estimated eigenvalue is globally dominant.

Frequently Asked Questions

1. What does the power iteration simulator calculate?

It estimates the dominant eigenvalue, meaning the eigenvalue with the largest absolute magnitude, and its associated eigenvector. It also displays the iteration history, Rayleigh quotient, and residual error.

2. What is a dominant eigenvalue?

A dominant eigenvalue is an eigenvalue whose absolute magnitude is greater than or equal to that of every other eigenvalue. When it is strictly greater than all others, it is called a unique dominant eigenvalue.

3. Why is normalization necessary?

Repeated matrix multiplication can make vector magnitudes extremely large or small. Normalization controls the magnitude while preserving the vector's direction.

4. What is the difference between L2 and infinity normalization?

L2 normalization divides a vector by the square root of the sum of its squared components. Infinity normalization divides by its largest absolute component. Both produce a normalized vector, but they use different scaling.

5. What does the residual error mean?

The residual measures how closely the estimated eigenpair satisfies the equation Av = λv. A smaller residual generally indicates a more accurate eigenpair approximation.

6. Can I use a 3×3 or larger matrix?

Yes. This simulator supports square matrices from 1×1 through 8×8, provided that the input matrix and initial vector have compatible dimensions.

7. Is power iteration suitable for symmetric matrices?

Yes. Real symmetric matrices have real eigenvalues and orthogonal eigenspaces for distinct eigenvalues. Power iteration is particularly useful when there is a unique dominant eigenvalue and the initial vector has a nonzero component in its eigendirection.

8. What happens if the algorithm does not converge?

The iteration may oscillate, converge slowly, or fail to produce a stable eigenvector approximation. Increasing the iteration limit, changing the initial vector, or using a different eigenvalue algorithm may help.

Explore More

Related Matrix Calculators and Simulators