I'm learning PCA in R language. I met two problems right now that I don't understand.
I am performing a PCA analysis in R on a 318×17 dataset using some custom code. I take eigen function in R to find eigenvalues and eigenvectors. But my 1st and 3rd eigenvectors are of the opposite sign to my handbook. My second eigenvectors is almost the same.
I know that given a square matrix A, the condition that characterizes an eigenvalue, $\lambda$, is the existence of a nonzero vector $x$ such that $Ax=\lambda x$; this equation can be rewritten as follows: $(A - \lambda)x=0$.
Now I calculate covariance of my data and have eigenvalues. I want to solve this linear combination equation to find $x$ and compare with initial eigenvectors. When I take solve function in R, my $x$ vector is always zero.
Here are my questions: Why the sign is different? How to use solve function in R to find a non-zero vector $x$?