# Linear Algebra, Finding Eigenvector Basis (in Matlab?)

"Let $A$ be a $5\times 5$ random matrix and let $B = A^TA$ (note that the entries of the matrix $B$ are symmetric with respect to the diagonal. Such a matrix is called a symmetric matrix). Find a basis of eigenvectors for the matrix $B$, and check that this basis is orthogonal."

Does anyone know how to do this, especially in Matlab? I am only really familiar with how to find eigenvalues.

-

Given some A, there are two ways to find the eigenvectors of B=A'*A:
1. [V, D] = eig(A'*A) and V is the required matrix of eigenvectors.
2. (better!) [U, S, V] = svd(A) and U is the required matrix of eigenvectors.
You know the usual $\mathbf Q^\top\mathbf Q=\mathbf I$ condition, no? –  Ｊ. Ｍ. Dec 3 '11 at 3:44
V in the first, and U in the second, are what you perform the Q'*Q operation on... –  Ｊ. Ｍ. Dec 3 '11 at 3:56