Functions > Vector and Matrix > Array Characteristics > Eigenvectors and Eigenvalues
Eigenvectors and Eigenvalues
eigenvals(M)—Returns a vector whose elements are the eigenvalues of M.
eigenvec(M, z)—Returns a single normalized eigenvector associated with eigenvalue z of M. The eigenvector is normalized to unit length. The eigenvec functions uses an inverse iteration algorithm.
eigenvecs(M, ["L"])—Returns a matrix containing all normalized eigenvectors of the matrix M. The nth column of the returned matrix is an eigenvector corresponding to the nth eigenvalue returned by eigenvals. The right eigenvector is returned by default. The eigenvecs function can also return the left eigenvector, satisfying vH · M = z · vH, where H indicates conjugate transpose.
genvals(M, N)—Returns a vector of computed eigenvalues, vi, each of which satisfies the generalized eigenvalue problem M · x = vi · N · x for its associated eigenvector xi.
genvecs(M, N, ["L"])—Returns a matrix containing the normalized eigenvectors corresponding to the eigenvalues in v, the vector returned by genvals. The ith column of this matrix is the eigenvector x satisfying the generalized eigenvalue problem.
tr(M)—Returns the trace of M, that is, the sum of the elements along the diagonal of M. This is equal to the sum of the eigenvalues.
M, N are square matrices of equal size and contain real or complex numbers.
"L" (optional) is a string. When used, the string "L" specifies the left eigenvector, and "R" the right. "R" is the default.
z is an eigenvalue of M.
Additional Information
The Intel Basic Linear Algebra Subprograms (BLAS)/Linear Algebra Package (LAPACK) libraries are used in all these functions.
You may wish to check whether your matrix is singular, or nearly so, using the condition number.
The eigenvecs function uses different algorithms for symmetrical matrices than for general matrices. PTC Mathcad may return unexpected results when you expect a matrix to be symmetrical but in fact it is not. For example, the value of π is not exact and therefore sin(π) is not exactly zero, potentially breaking the symmetry of a matrix.
The results returned by eigenvals and genvals are sorted in descending order from largest to smallest. This sorting order applies only to the real values. If returned values are pure imaginary, then the sorting has no meaning.
The results returned by eigenvec and eigenvecs are not necessarily identical. For a given eigenvalue, there are infinitely many eigenvectors, and the one found depends on the algorithm used. Every eigenvector for a particular eigenvalue is a multiple of other eigenvectors.
Was this helpful?