Spectral Decomposition Calculator

Compute eigenvalues, eigenvectors, diagonal matrix, and matrix reconstruction for a real symmetric matrix.

This calculator is designed for real symmetric matrices, where the spectral decomposition is A = QΛQᵀ.

About the Author: Created by Fotios Angelakis, MSc in Mechanical Engineering, with experience in engineering calculations, numerical methods, and data analytics. Learn more about the author's qualifications and experience.

Choose Output Type

Enter a symmetric square matrix and click compute.

How the Spectral Decomposition Calculator Works

The Spectral Decomposition Calculator breaks a real symmetric matrix into its eigenvalues and eigenvectors. It is useful in numerical analysis, engineering, physics, vibration analysis, statistics, and data science.

For a real symmetric matrix, spectral decomposition writes the matrix as:

A = Q · Λ · Qᵀ

Here, Q is the matrix of orthonormal eigenvectors, Λ is the diagonal matrix of eigenvalues, and Qᵀ is the transpose of Q.

A = Q · Λ · Qᵀ Spectral decomposition of a symmetric matrix eigenvectors eigenvalues transpose

What Is Spectral Decomposition?

Spectral decomposition is a matrix factorization based on eigenvalues and eigenvectors. It reveals important properties of a matrix, such as principal directions, scaling behavior, and stability.

For real symmetric matrices, the eigenvectors can be chosen to be orthonormal. This allows the clean form:

A = QΛQᵀ

Input Requirements

  • The matrix must be square.
  • This calculator is intended for real symmetric matrices.
  • The entries can be positive, negative, zero, or decimal values.
  • The maximum dimension is limited to keep browser calculations fast.

Example: 2 × 2 Symmetric Matrix

Consider:

A = [2, 3]
    [3, 4]

Approximate eigenvalues:

λ₁ ≈ 6.162278
λ₂ ≈ -0.162278

The eigenvectors form the matrix Q. The original matrix can then be reconstructed using:

A = QΛQᵀ

Example: 3 × 3 Symmetric Matrix

A common test matrix is:

A = [4, 1, 0]
    [1, 3, 1]
    [0, 1, 2]

This type of matrix appears in engineering and numerical problems such as structural mechanics, vibration analysis, heat transfer, and discretized differential equations.

Applications of Spectral Decomposition

  • Structural mechanics: Modal analysis and vibration modes.
  • Data science: Principal Component Analysis and covariance matrices.
  • Physics: Energy states, operators, and transformations.
  • Numerical analysis: Stability, conditioning, and matrix behavior.
  • Machine learning: Dimensionality reduction and matrix factorization.

Spectral Decomposition vs Eigenvalue Decomposition

Concept Formula Typical Matrix Type
Spectral decomposition A = QΛQᵀ Real symmetric matrices
General eigenvalue decomposition A = VΛV⁻¹ Diagonalizable square matrices
Important: The standard spectral decomposition form A = QΛQᵀ applies cleanly to real symmetric matrices. A non-symmetric matrix may require the more general eigenvalue decomposition A = VΛV⁻¹, and may involve complex eigenvalues.

Frequently Asked Questions

What does the decomposition show?

It shows how a matrix acts along its eigenvector directions and how strongly it scales each direction through its eigenvalues.

Why is the reconstructed matrix useful?

The reconstructed matrix verifies the decomposition. If QΛQᵀ closely matches the original matrix, the calculation is accurate.

Does the matrix need to be square?

Yes. Eigenvalue-based spectral decomposition requires a square matrix.

Does the matrix need to be symmetric?

For the standard real spectral decomposition formula A = QΛQᵀ, yes. Symmetric matrices have real eigenvalues and orthogonal eigenvectors.

What does the tolerance do?

The tolerance is used to check symmetry and reconstruction accuracy. A smaller tolerance is stricter.