Consider the real, symmetric matrix
S = (2, 1; 1, 2)
From the characteristic equation |S - λ I|, we have the quadratic (2-λ)^2 - 1 = 0, whose solutions yield the eigenvalues 3 and 1. The corresponding eigenvectors are (1;-1) and (1;1).
octave:4> [V,lambda] = eig([2, 1; 1,2])
V =
-0.70711 0.70711
0.70711 0.70711
lambda =
Diagonal Matrix
1 0
0 3
Why are the eigenvectors in octave [-0.70711; 0.70711] and [0.70711; 0.70711]?