MATLAB: Eig versus svd functions

eig

Hi,
I would like to ask what is the difference between the function eig and svd and what is the difference between the right eigenvectors and the right singular eigenvectors of these functions?
Thank you

Best Answer

SVD is a decomposition for arbitrary-size matrices, while EIG applies only to square matrices. They are very much related:
The right singular vectors of A are the eigenvectors of A'*A, and the left singular vectors of A are the eigenvectors of A*A'.
Similarly the singular values of A are the square root of the eigenvalues of A*A' (or A'*A, the eigenvalues of those are just the same)
Related Question