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