Frage

Here is my problem, I have a real symmetric matrix M depending on two parameters a,b (that are assumed to be positive) and I want to find an orthogonal matrix P such that PMP^{-1} is a diagonal matrix. Here is an example of what I've done :

assume(a>0,b>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));

or simply,

assume(a>0,b>0);
M : matrix([a,a+b,a+b],[a+b,a,a+b],[a+b,a+b,a]);
load("eigen");
[myeigval,myeigvec]:similaritytransform(M);

I get the same result for this two tests :

[[[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)]]]]

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?

War es hilfreich?

Lösung

Look at the global variables rightmatrix and leftmatrix after you call similaritytransform. When I try your example, I find that rightmatrix . leftmatrix is the identity matrix (and so is leftmatrix . rightmatrix).

I agree the documentation for similaritytransform isn't entirely clear. Oh well.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top