Effacer les filtres
Effacer les filtres

null and eig functions

2 vues (au cours des 30 derniers jours)
Dan Parrish
Dan Parrish le 28 Juil 2011
I would like to know how the null function works, specifically the way that it produces a dense matrix of eigenvectors when the original matrix has a zero eigenvalue with very high multiplicity.
I started with a matrix M = ones(6). This produces a 6x6 matrix of all ones. Since it is symmetric, its eigenvectors should produce an orthogonal matrix. Calculating the eigenvectors by hand (via row reduction of M-lambda*I), then changing their lengths to equal 1 does not produce an orthogonal matrix, whereas with distinct eigenvalues it always does.
I actually posted this same question a couple days ago, and the reply was that it used singular value decomposition (svd). I studied svd on Wikipedia, but no matter how I constructed M = USV*, neither U nor V nor V* or any permutation of products resulted in an orthogonal matrix.
Another odd thing is that orthogonal matrices can be derived from the eigenvectors of symmetric matrices with different Matlab functions, but in the case of ones(6), they all produce different answers.
The standard Gram-Schmidt orthogonalization process produces a fairly dense orthogonal matrix. null produces a slightly more dense orthogonal matrix. [t d] = eig(M) places the eigenvectors into the matrix t and this is the most dense of the orthogonal matrices I found.
Can you fill me in on the exact procedure null and eig use ?

Réponses (2)

Walter Roberson
Walter Roberson le 28 Juil 2011
You do not need to go as far as ones(6) : the same thing happens for eig(ones(3)).
It appears to me that this is a matter of round-off error.

Titus Edelhofer
Titus Edelhofer le 28 Juil 2011
Hi Dan,
I'm not sure about what exactly is the question: are you interested how the computation is done because it's interesting to know, or because it does not do exactly what you want it to do?
If I call
[V,D]=eig(ones(n));
it produces an orthogonal matrix V (both for n=3 as Walter suggests as well as n=6). For n=6 I get:
err = abs(V*V'-eye(6));
max(abs(err))
ans =
1.9776e-016
so indeed just roundoff as Walter said.
Titus

Catégories

En savoir plus sur Linear Algebra dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by