Contents Previous Next Subchapters Current Chapters-> kron inv trace det logdet rank cond null orth pinv cholesky lu svd qr qred eigen geneig eigsym symeig schur levinson tridiag BlockTriDiag Parent Chapters-> Omatrix6 linear eigen Search Tools-> contents reference index search

Eigenvalues and EigenVectors of a General Matrix
 Syntax `eigen(`x`)` `eigen(`x`,`e`)` `[`e`,`d`] = eigen(`x`)` See Also eig , geneig , eigsym , symeig , schur , svd

Description
Computes the eigenvalues of the matrix x, where x is a square real, double-precision or complex matrix. ``` ```If the return value d is not present, the return value of `eigen` is a complex column vector, with the same row dimension as x, containing the eigenvalues of x. If the return value d is present, it is set to a complex diagonal matrix with the same dimension as x and with the eigenvalues along its diagonal. ``` ```If the argument e is present the eigenvectors of x are also computed. The input value of e does not matter and its output value is a complex matrix containing the eigenvectors. It has the same dimension as x. Each of the columns of e has norm one; i.e., for j between 1 and the row dimension of x ```             __________________________      1 =   /       2                2          \/ e(i, 1)  + ... + e(i, n) ```where n is the row dimension of x. ``` ```The eigenvalues and eigenvectors satisfy the equation ```      e * d = x * e ```
Example
If you enter ```      x  = {[1., 1.], [2., 2.]}      [e, d] = eigen(x)      print e, d ``` O-Matrix will respond ```      {      [ (0.447214,0) , (-0.707107,0) ]      [ (0.894427,0) , (0.707107,0) ]      }      {      [ (3,0) , (0,0) ]      [ (0,0) , (2.22045e-016,0) ] } ```
Mlmode
In Mlmode , this function is called `eig` instead of `eigen`. If in Mlmode you enter ```      x  = [1., 1.; 2., 2.]      eig(x); ``` O-Matrix will respond ```      {       (3, 0)       (0, 0)       } ```