I’m afraid there is no way to get around the fact that the eigenvalue decomposition is not unique and that you need to have a reasonable understanding of the theory to be able to analyze algorithms that makes use of the eigenvectors.
This specific case illustrates the fact that if x
is an eigenvector, then so is -x
and there is no easy way to decide which sign to choose. If the downstream algorithm is sensitive to which sign happens to come out of the eigenvalue decomposition, something is not quite sound and you are likely in for a lot of trouble.