Spectral Decomposition Calculator

Analyze symmetric matrices with confidence and precision. See eigenvalues, orthonormal eigenvectors, and projectors together instantly. Plot results, compare components, and export polished study reports.

Purpose: This calculator finds eigenvalues, orthonormal eigenvectors, projector matrices, diagonal matrix Λ, and the reconstruction A = QΛQT = Σ λiPi for real symmetric 2×2 and 3×3 matrices.

Result panels appear below this header and above the form after submission, exactly as requested.

Calculator Form

Enter a real symmetric matrix only. The tool supports 2×2 and 3×3 matrices and sorts eigenvalues in your selected order.

Matrix Entries

Important: For a real spectral decomposition with orthonormal eigenvectors, the matrix must be symmetric. Example: a12 = a21, a13 = a31, and a23 = a32.

Formula Used

A = QΛQT

Here, Q contains orthonormal eigenvectors as columns, and Λ is a diagonal matrix of eigenvalues.

A = Σ λiviviT

This is the spectral decomposition form. Each term uses one eigenvalue and one projector matrix.

Pi = viviT

Every projector isolates the component of a vector along one eigendirection.

How to Use This Calculator

  1. Select the matrix size, either 2×2 or 3×3.
  2. Enter a real symmetric matrix. Match off-diagonal pairs carefully.
  3. Choose your preferred decimal precision and eigenvalue order.
  4. Click Calculate Spectral Decomposition.
  5. Review the eigenvalues, eigenvectors, diagonal matrix, projectors, and reconstruction error.
  6. Use the CSV and PDF buttons to save the results for reports, assignments, or revision.

Example Data Table

Example Matrix Type What to Expect
Example 1 [[2, 1], [1, 2]] 2 × 2 symmetric Two real eigenvalues, orthogonal eigenvectors, exact reconstruction.
Example 2 [[4, 1, 1], [1, 3, 0], [1, 0, 2]] 3 × 3 symmetric Three real eigenvalues and three rank-one projector matrices.
Example 3 [[5, 2, 0], [2, 5, 0], [0, 0, 3]] 3 × 3 symmetric Repeated eigenvalues may appear, but reconstruction still works.

Frequently Asked Questions

1) What is spectral decomposition?

Spectral decomposition writes a symmetric matrix as a sum of eigenvalue-weighted projector matrices. It also appears as A = QΛQᵀ, where Q holds orthonormal eigenvectors and Λ stores eigenvalues.

2) Why does this calculator require a symmetric matrix?

A real symmetric matrix guarantees real eigenvalues and orthonormal eigenvectors. That property makes the decomposition stable, interpretable, and suitable for QΛQᵀ with projector matrices built from normalized eigenvectors.

3) What does the projector matrix represent?

A projector matrix extracts the part of any vector aligned with one eigendirection. It is formed as P = vvᵀ when v is a unit eigenvector.

4) What does the orthogonality check QᵀQ show?

It should be close to the identity matrix. That means the eigenvectors are unit length and perpendicular to one another, which is essential for a correct spectral decomposition.

5) Can repeated eigenvalues still work?

Yes. A symmetric matrix can have repeated eigenvalues. The eigenspace may contain multiple valid orthonormal bases, but the decomposition and matrix reconstruction remain correct.

6) What does reconstruction error mean?

It measures how closely the sum of spectral terms rebuilds the original matrix. Very small values usually come from floating-point rounding, not from a failed decomposition.

7) What does the Plotly graph display?

The graph plots the computed eigenvalues. It helps you compare spectral components quickly and see which directions carry the largest magnitude in the decomposition.

8) Can I save the results for classwork or reports?

Yes. Use the CSV export for spreadsheet work and the PDF export for a clean printable summary of the matrix, eigenvalues, eigenvectors, and projector matrices.

Related Calculators

eigenvalue dominancealgebraic multiplicity and geometric multiplicity

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.