Free Diagonalize Matrix Calculator

[
]

Eigenvalues

Select a matrix size, enter all entries, then click Calculate.

Matrix Diagonalization: Concept and Importance

A square matrix is a rectangular array of numbers arranged in rows and columns, with an equal number of rows and columns. Matrix diagonalization is a transformation that rewrites such a square matrix AA into the form A=SDS−1A = S D S^{-1}, where DD is a diagonal matrix carrying the eigenvalues of AA and SS is a matrix whose columns are the corresponding eigenvectors. This so‑called SDS⁻¹ decomposition (sometimes referred to as the SDS‑1 decomposition) lies at the heart of eigenvalue decomposition and is one of the most powerful tools in linear algebra.

The advantage of diagonalization is that once you have the representation A=SDS−1A = S D S^{-1}, many computations become far simpler. For instance, matrix powers: Ak=SDkS−1A^{k} = S D^{k} S^{-1}, where DkD^{k} is obtained by raising each diagonal entry to the kk-th power. This is enormously faster than multiplying the original matrix kk times. Similarly, matrix exponentials, inverses (when no eigenvalue is zero), and functions of matrices all benefit from this decomposition.

The process applies to any square matrix that is diagonalizable, and with an online matrix diagonalization calculator you can obtain the decomposition for sizes like 2×2, 3×3, and even larger matrices.

Diagonal Matrices and Their Advantages

A diagonal matrix is a square matrix in which every entry off the main diagonal is zero. In n×nn\times n form it looks like

D=(d10⋯00d2⋯0⋮⋮⋱⋮00⋯dn).D = \begin{pmatrix} d_1 & 0 & \cdots & 0 \\ 0 & d_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & d_n \end{pmatrix}.

Working with diagonal matrices is convenient because:

  • The sum and product of two diagonal matrices are again diagonal.
  • The transpose of a diagonal matrix equals itself.
  • Raising a diagonal matrix to a power simply raises each diagonal element to that power: Dk=diag⁡(d1k,d2k,…,dnk)D^{k} = \operatorname{diag}(d_1^{k}, d_2^{k}, \dots, d_n^{k}).

These properties are the reason we pursue diagonalization: once a matrix is diagonalized, burdensome tasks become straightforward.

Eigenvalues and Eigenvectors: The Cornerstones

For a square matrix AA of size n×nn \times n, an eigenvalue λ\lambda and an eigenvector v\mathbf{v} (non‑zero) satisfy

Av=λv.A \mathbf{v} = \lambda \mathbf{v}.

Rearranging gives (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}, where II is the identity. For a non‑trivial solution, the determinant of A−λIA - \lambda I must vanish:

det⁡(A−λI)=0.\det(A - \lambda I) = 0.

This equation is the characteristic polynomial of AA. Its degree equals the size of the matrix: quadratic for a 2×22\times2 matrix, cubic for a 3×33\times3 matrix, etc.

Solving the characteristic polynomial yields the eigenvalues. Over the field of complex numbers, an n×nn \times n matrix always possesses nn eigenvalues (counted with multiplicity). However, if we restrict to real numbers, some matrices may have no real eigenvalues—such matrices are not diagonalizable over R\mathbb{R} but may become diagonalizable over C\mathbb{C} if they have enough eigenvectors.

A matrix is diagonalizable if and only if for each eigenvalue the geometric multiplicity (the number of linearly independent eigenvectors) equals the algebraic multiplicity (the exponent in the characteristic polynomial). When an eigenvalue has multiplicity greater than 1 but does not have enough independent eigenvectors, the matrix is defective and cannot be diagonalized.

Step‑by‑Step Diagonalization Procedure

To diagonalize a square matrix AA of size n×nn \times n, follow these steps:

  1. Compute the characteristic polynomial: Find det⁡(A−λI)\det(A - \lambda I) as a polynomial in λ\lambda.
  2. Find the eigenvalues: Solve det⁡(A−λI)=0\det(A - \lambda I) = 0. Denote the eigenvalues λ1,λ2,…,λn\lambda_1, \lambda_2, \dots, \lambda_n, counting multiplicities.
  3. For each eigenvalue, find eigenvectors: Substitute λ\lambda into (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0} and solve the homogeneous linear system. The number of free parameters equals the geometric multiplicity.
  4. Check diagonalizability: If the total number of linearly independent eigenvectors is nn, the matrix is diagonalizable. Otherwise it is not.
  5. Build the matrices:
    • Place the eigenvectors as columns in SS (order can be chosen arbitrarily).
    • Place the corresponding eigenvalues on the diagonal of DD in the same order.
  6. Verify: Confirm that A=SDS−1A = S D S^{-1}.

A diagonalizable matrix solver or eigenvalue decomposition calculator can automate steps 1–5, particularly for larger systems where manual computation is tedious.

Diagonalizing a 3×3 Matrix — A Complete Example

Let’s apply the procedure to the concrete matrix

A=(10021−10−11).A = \begin{pmatrix} 1 & 0 & 0 \\ 2 & 1 & -1 \\ 0 & -1 & 1 \end{pmatrix}.

Characteristic Polynomial

det⁡(A−λI)=det⁡(1−λ0021−λ−10−11−λ).\det(A - \lambda I) = \det\begin{pmatrix} 1-\lambda & 0 & 0 \\ 2 & 1-\lambda & -1 \\ 0 & -1 & 1-\lambda \end{pmatrix}.

Expanding along the first row:

(1−λ)[(1−λ)2−(−1)(−1)]=(1−λ)[(1−λ)2−1].(1-\lambda)\big[(1-\lambda)^2 - (-1)(-1)\big] = (1-\lambda)\big[(1-\lambda)^2 - 1\big].

Simplifying:

(1−λ)(λ2−2λ)=λ(1−λ)(λ−2).(1-\lambda)(\lambda^2 - 2\lambda) = \lambda(1-\lambda)(\lambda-2).

Thus the characteristic polynomial is λ(1−λ)(λ−2)=0\lambda(1-\lambda)(\lambda-2)=0, giving eigenvalues λ=0\lambda=0, λ=1\lambda=1, and λ=2\lambda=2. All are distinct, so the matrix is diagonalizable.

Eigenvectors

For each eigenvalue we solve (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}.

  • λ=0\lambda = 0: The system reduces to x=0x=0, y=ty = t, z=tz = t. Choosing t=1t=1 gives v1=(0,1,1)T\mathbf{v}_1 = (0, 1, 1)^T.
  • λ=1\lambda = 1: The system gives y=0y=0 and x=0.5zx = 0.5z. Letting z=1z=1 yields v2=(0.5,0,1)T\mathbf{v}_2 = (0.5, 0, 1)^T. (An equivalent integer‑scaled version like (1,0,2)T(1,0,2)^T is also valid.)
  • λ=2\lambda = 2: The system yields x=0x=0 and y=−zy = -z. With z=1z=1 we obtain v3=(0,−1,1)T\mathbf{v}_3 = (0, -1, 1)^T.

All three eigenvectors are linearly independent, confirming diagonalizability.

Constructing SS and DD

Place the eigenvectors in SS (respecting the order of the eigenvalues):

S=(00.5010−1111),D=(000010002).S = \begin{pmatrix} 0 & 0.5 & 0 \\ 1 & 0 & -1 \\ 1 & 1 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{pmatrix}.

It can be verified that A=SDS−1A = S D S^{-1}.

Using the Decomposition

Now computing high powers of AA becomes trivial. For example, A20=SD20S−1A^{20} = S D^{20} S^{-1} where

D20=(020000120000220)=(00001000220).D^{20} = \begin{pmatrix} 0^{20} & 0 & 0 \\ 0 & 1^{20} & 0 \\ 0 & 0 & 2^{20} \end{pmatrix} = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2^{20} \end{pmatrix}.

Multiplying SS by this result and then by S−1S^{-1} yields A20A^{20} with far less effort than brute‑force multiplication.

Using a Matrix Diagonalization Calculator

An online matrix diagonalization calculator (also called an eigenvalue decomposition calculator or find matrix diagonalization tool) lets you perform the entire process instantly. You simply enter the entries of your matrix; the tool returns the eigenvalues, eigenvectors, and the matrices SS and DD. It works for 2×2, 3×3, and larger square matrices, and it can even indicate if the matrix is not diagonalizable.

Such calculators are especially helpful when the characteristic polynomial is difficult to factor or when dealing with large systems. They remove the heavy arithmetic while still giving you the full decomposition.

Summary

Matrix diagonalization expresses a square matrix as A=SDS−1A = S D S^{-1} using its eigenvalues and eigenvectors. The resulting diagonal form simplifies powers, exponentials, and many other matrix functions. The key steps are finding the eigenvalues via the characteristic polynomial, obtaining enough independent eigenvectors, and assembling SS and DD. Whether you work by hand or use an online matrix diagonalization solver, understanding this process is essential for advanced linear algebra and its applications in differential equations, physics, and data science.

FAQ

1. How do I know if a matrix is diagonalizable?

A square matrix is diagonalizable if it has n linearly independent eigenvectors, where n is its size. This always holds when all eigenvalues are distinct. For repeated eigenvalues, you must check that the geometric multiplicity (number of independent eigenvectors) equals the algebraic multiplicity (exponent in the characteristic polynomial). If any eigenvalue falls short, the matrix is not diagonalizable.

2. What are the steps for diagonalizing a matrix?

The main steps are: 1. Compute the characteristic polynomial det(A−λI). 2. Solve for eigenvalues (roots of the polynomial). 3. For each eigenvalue, solve (A−λI)v = 0 to get eigenvectors. 4. If enough linearly independent eigenvectors exist, the matrix is diagonalizable. 5. Build S from the eigenvectors and D from the eigenvalues. 6. Verify that A = S D S⁻¹.

3. How does diagonalization help in computing high powers of a matrix?

Once you have A = S D S⁻¹, then Aᵏ = S Dᵏ S⁻¹. Since D is diagonal, Dᵏ is simply each diagonal entry raised to the k‑th power. This is much faster than multiplying the original matrix k times, especially for large k.

4. Can a matrix with complex eigenvalues be diagonalized?

Yes, over the complex numbers. Every n×n matrix has n eigenvalues counted with multiplicity (by the fundamental theorem of algebra). If each eigenvalue has enough eigenvectors (geometric multiplicity equals algebraic multiplicity), the matrix is diagonalizable over ℂ. Real matrices without real eigenvalues are not diagonalizable over ℝ but may be diagonalizable over ℂ.

How to Use

  1. Select the matrix size: 2x2 or 3x3.
  2. Enter all the matrix entries in the grid of input fields.
  3. Click Calculate to see the eigenvalues, eigenvectors, and the diagonal decomposition A = S·D·S⁻¹.