什麼是eigen values, eigen vector? 有什麼用?

2007-05-02 7:46 am
希望可以詳解...謝謝....

回答 (2)

2007-05-02 8:20 pm
✔ 最佳答案
上面的答案只從一個如何從電腦計算eigenvalue/eigenvector角度去回答。
從某層面來說,問題沒有問及如何計算它們,所以可說是答非所問。

要明白eigenvalue和eigenvector,一定要先明白matrix和vector,所以以下作答就假設了這一點。

eigenvalue和eigenvector的定義是

Ax = kx.

其中, A 是一個n x n 的matrix
x 是一個 n x 1 的 vector, 它就是eigenvector, 它不可以是zero vector.
k 是 complex number, 它就是eigenvalue.

每有一個n x n 的 matrix,就會有 n 個 eigenvalue (counting multiplicity)

有了eigenvector和eigenvalue,我們可以做diagonalization.
大部份 n x n 的 matrix都可以寫成

A = P^-1 D P, 其中D是一個diagonal matrix, P 是把eigenvector寫在一起的matrix, D的對角線就是eigenvalues.

diagonalization 可以用來計matrix的高次方。

如果A是symmetric的話, P 就會是othrogonal, P^-1 就是 p^T

Eigenvector 還有很多用途,例如做Principle Component Analysis (PCA) 等。
2007-05-02 8:30 am
Eigen value and eigen vector
The following methods are available to evaluate the eigen values and corresponding eigen vectors of a matrix.

1. bool eigen (valarray & reival) const;
2. bool eigen (valarray & reival, matrix & eivec) const;

3. bool eigen (valarray & reival, valarray & ieival) const;
4. bool eigen (valarray<& reival, valarray & ieival, matrix & eivec) const;


Parameter

reival
Reference to a valarray class object to receive the real eigen values of a matrix.
ieival
Reference to a valarray class object to receive the imaginary eigen values of a matrix.
eivec
Reference to a matrix class object to receive the eigen vectors of a matrix.


Finds the eigen values of a symmetric matrix. If successful, the eigen values are copied into the valarray class object reival, and this method returns true, otherwise, it returns false.


Finds the eigen values and eigen vectors of a symmetric matrix. If successful, the eigen values are copied into the valarray class object reival and corresponding eigen vectors into matrix eivec, and this method returns true, otherwise, it returns false.


Finds the eigen values of a general square matrix. If successful, the real eigen values are copied into reival and imaginary eigen values into ieival, and this method returns true, otherwise, it returns false.


Finds the eigen values and eigen vectors of a general square matrix. If successful, the real eigen values are copied into reival, imaginary eigen values into ieival, and corresponding eigen vectors into eivec, and this method returns true, otherwise, it returns false.



Examples
typedef techsoft::matrix Matrix;
typedef std::valarray Vector;

using techsoft::gmslice;
using techsoft::LTRIANG;
using techsoft::UTRIANG;

size_t n = 4;
Matrix a(n,n), ev(n,n);
Vector d(n), e(n);
bool ret;

a.rand();
a = a[gmslice(UTRIANG)];
a[gmslice(LTRIANG)] = ~a; // a is now a symmetric matrix

ret = a.eigen( d); // Finds the eigen values
ret = a.eigen( d, ev); // Finds both eigen values and eigen vectors

a.rand();
ret = a.eigen( d, e); // Finds real and imaginary eigen values
ret = a.eigen( d, e, ev); // Finds real and imaginary eigen values and eigen vectors


收錄日期: 2021-04-23 16:57:21
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070501000051KK06178

檢視 Wayback Machine 備份