title: R and MATLAB returning different eigenvectors
body: <p>I'm missing something obvious, but here goes:</p>
  
  <p>In <code>R</code>,</p>
  
  <pre><code>dput(M)
  structure(c(-2.77555756156289e-16, 9.63770703841896e-16, 0, 9.63770703841896e-16, 
  10.6543192562307, 4.11228781751498e-14, 0, 4.11228781751498e-14, 
  275.591724761168), .Dim = c(3L, 3L), .Dimnames = list(c("", "", 
  ""), c("", "", "")))
  
  #thus M is
  
   -2.775558e-16 9.637707e-16 0.000000e+00
    9.637707e-16 1.065432e+01 4.112288e-14
    0.000000e+00 4.112288e-14 2.755917e+02
  
  eig(M)
  $values
  [1]  2.755917e+02  1.065432e+01 -2.775558e-16
  
  $vectors
               [,1]         [,2] [,3]
  [1,] 5.428099e-34 9.045822e-17    1
  [2,] 1.552173e-16 1.000000e+00    0
  [3,] 1.000000e+00 0.000000e+00    0
  </code></pre>
  
  <p>But in <code>MATLAB</code></p>
  
  <pre><code>[vv,ee] = eig(M)
  % hand-copied so ignore the precision)
  vv = 
     1.0    -0.    -0.
     0      0      -1
     0      -1     0
  
  ee = 
   %diagonals only
  0.0    275.59   10.6543
  </code></pre>
  
  <p>The eigenvalues match up with the  locations where <code>abs(vv) == 1</code> ,  but the thing I don't understand is why some eigenvectors are negative one in MATLAB but not in R. 
  It makes a big difference, as I'm trying to port <a href="http://www.mathworks.com/matlabcentral/fileexchange/45356-fitting-quadratic-curves-and-surfaces" rel="nofollow">this MATLAB package</a>, (in particular, <code>parabolafit_direct.m</code> and `parabolafit_directm.m' )  and the subsequent algorithms are sensitive to the sign of the values.  I checked, and the MATLAB package does produce the correct fitted output (parabolic curve to dataset), while my R-port does not, because of these sign differences.  </p>
  
  <p>So, why the difference, and what can I do to modify my <code>R</code> code to get the desired signs of the data? </p>
  
  <p>EDIT: I continue to dig into the code to see if these two "negative one" values cancel out in the next set of equations, but haven't seen that yet.</p>