# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.eigen

## Class EigenDecomposition

• java.lang.Object
• com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.eigen.EigenDecomposition

• public class EigenDecomposition
extends Object
Let A be a square, diagonalizable N × N matrix with N linearly independent eigenvectors. Then A can be factorized as Q * D * Q' = A. Q is the square N × N matrix whose i-th column is the eigenvector of A, and D is the diagonal matrix whose diagonal elements are the corresponding eigenvalues.
Wikipedia: Eigendecomposition of a matrix
• ### Constructor Summary

Constructors
Constructor and Description
EigenDecomposition(Matrix A)
Runs the eigen decomposition on a square matrix.
EigenDecomposition(Matrix A, double epsilon)
Runs the eigen decomposition on a square matrix.
• ### Method Summary

All Methods
Modifier and Type Method and Description
DiagonalMatrix D()
Get the diagonal matrix D as in Q * D * Q' = A.
Matrix Q()
Get Q as in Q * D * Q' = A.
Matrix Qt()
Get Q' as in Q * D * Q' = A.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### EigenDecomposition

public EigenDecomposition(Matrix A)
Runs the eigen decomposition on a square matrix.
Parameters:
A - a square, diagonalizable matrix
• #### EigenDecomposition

public EigenDecomposition(Matrix A,
double epsilon)
Runs the eigen decomposition on a square matrix.
Parameters:
A - a square, diagonalizable matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
• ### Method Detail

• #### D

public DiagonalMatrix D()
Get the diagonal matrix D as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
D
• #### Q

public Matrix Q()
Get Q as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
Q
• #### Qt

public Matrix Qt()
Get Q' as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
Q.t()