title: Diagonalize a symmetric matrix in Maxima
body: <p>Here is my problem, I have a real symmetric matrix <em>M</em> depending on two parameters <em>a,b</em> (that are assumed to be positive) and I want to find an orthogonal matrix <em>P</em> such that <em>PMP^{-1}</em> is a diagonal matrix. Here is an example of what I've done :</p>
  
  <pre><code>assume(a&gt;0,b&gt;0);
  M : matrix([a,a+b,a+b],[a+b,a,a+b],[a+b,a+b,a]);
  load("eigen");
  [myeigval,myeigvec]:similaritytransform(ev(M,hermitianmatrix));
  </code></pre>
  
  <p>or simply,</p>
  
  <pre><code>assume(a&gt;0,b&gt;0);
  M : matrix([a,a+b,a+b],[a+b,a,a+b],[a+b,a+b,a]);
  load("eigen");
  [myeigval,myeigvec]:similaritytransform(M);
  </code></pre>
  
  <p>I get the same result for this two tests :</p>
  
  <pre><code>[[[2*b+3*a,-b],[1,2]],[[[1/sqrt(3),1/sqrt(3),1/sqrt(3)]],[[1/sqrt(2),0,-1/sqrt(2)],[0,1/sqrt(2),-1/sqrt(2)]]]]
  </code></pre>
  
  <p>The norm of the vectors is equal to 1 but this vectors do not give me an orthogonal matrix. Can somebody explain to me what is the problem?</p>