Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
SVD which one is which

Subject: SVD which one is which

From: Ali Saleemi

Date: 26 Dec, 2008 22:50:03

Message: 1 of 5

SVD gives eigenvectors in descending order, is there anyway to know which eigen vector belongs to which variable in the original matrix? I dont have a square matrix in my original data so I cannot use eig() which according to my knowledge does not sort the eigenvectors.

Regards

Saleemi

Subject: SVD which one is which

From: Chris Conner

Date: 26 Dec, 2008 23:05:03

Message: 2 of 5

the eigenvectors/values are listed in order of descending power. there is a 1-1 correspondence, so the first eigenvector matches with the first eigenvalue.

Subject: SVD which one is which

From: Roger Stafford

Date: 26 Dec, 2008 23:21:02

Message: 3 of 5

"Ali Saleemi" <naumansaleemi@hotmail.com> wrote in message <gj3n2r$akd$1@fred.mathworks.com>...
> SVD gives eigenvectors in descending order, is there anyway to know which eigen vector belongs to which variable in the original matrix? I dont have a square matrix in my original data so I cannot use eig() which according to my knowledge does not sort the eigenvectors.
> .......

  I refer you to the Wikipedia website for a discussion on singular value decompositions. In particular read the section entitled "Relation to eigenvalue decomposition."

http://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition

  In answer to your question "which eigen vector belongs to which variable in the original matrix", there is no such relationship. There is a relationship in the pairings between eigenvalues and eigenvectors, which is a different concept. When matlab's 'svd' does give an eigenvalue decomposition, the pairing is between the eigenvalues of S and the corresponding columns of V in the decomposition

 M = U*S*V';

Roger Stafford

Subject: SVD which one is which

From: Johan Carlson

Date: 27 Dec, 2008 10:48:02

Message: 4 of 5

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gj3osu$8gs$1@fred.mathworks.com>...
> "Ali Saleemi" <naumansaleemi@hotmail.com> wrote in message <gj3n2r$akd$1@fred.mathworks.com>...
> > SVD gives eigenvectors in descending order, is there anyway to know which eigen vector belongs to which variable in the original matrix? I dont have a square matrix in my original data so I cannot use eig() which according to my knowledge does not sort the eigenvectors.
> > .......
>
> I refer you to the Wikipedia website for a discussion on singular value decompositions. In particular read the section entitled "Relation to eigenvalue decomposition."
>
> http://en.wikipedia.org/wiki/Singular_value_decomposition#Relation_to_eigenvalue_decomposition
>
> In answer to your question "which eigen vector belongs to which variable in the original matrix", there is no such relationship. There is a relationship in the pairings between eigenvalues and eigenvectors, which is a different concept. When matlab's 'svd' does give an eigenvalue decomposition, the pairing is between the eigenvalues of S and the corresponding columns of V in the decomposition
>
> M = U*S*V';
>
> Roger Stafford


As Roger wrote, there is no direct link between any ONE variable in X and the eigenvectors.

The columns of U form an orthonormal basis of the columns space of X, while the columns of V form an orthonormal basis of the row space of X. As such, the basis vectors will most likely be linear combinations of the variables in X, which is actually often the point.

There are some more interesting properties as well, namely that the eigenvector corresponding to the largest eigenvalue represents the direction in which the variance of the data is the largest, and then similarly for the remaining vectors.

Check the Wiki for more details, or the excellent book "Linear Algebra and Its Applications" by Gilbert Strang. There's a good appendix explaining all this.

/JC

Subject: SVD which one is which

From: Greg Heath

Date: 27 Dec, 2008 17:43:47

Message: 5 of 5

On Dec 26, 5:50 pm, "Ali Saleemi" <naumansale...@hotmail.com> wrote:
> SVD gives eigenvectors in descending order, is there
> anyway to know which eigen vector belongs to which
> variable in the original matrix?

In general, SVD and SVDS yields singular vectors of A,
not eigenvectors of A. The nonnegative real singular
values and corresponding singular vectors are
ordered w.r.t ascending singular values in SVD.
I am not sure about the ordering in SVDS..

doc SVD
dov SVDS

In general, each singular vector is a linear combination of
all the variables. In real-world-problems, it is rare that
singular vectors are coordinate aligned.

The singular vectors of A are eigenvectors of
A*A^T and A^T*A.

> I dont have a square matrix
> in my original data so I cannot use eig() which according
> to my knowledge does not sort the eigenvectors.

If A is square, both EIG and EIGS yield eigenvectors
of A. If A is symmetric, the eigenvalues are real and the
corresponding eigenvectors are sorted (ascending for EIG
and descending for EIGS).

doc EIG
doc EIGS

Hope this helps.

Greg

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us