|
D.15.26.9 diagonalizeMatrixSimul
Procedure from library VecField.lib (see VecField_lib).
- Usage:
- diagonalizeMatrixSimul(list l), where l is a list of quadratic matrices
of same dimensions
- Return:
- trafo matrix U s.t. U*A*inv(U) is diagonal for each A in l
- Assume:
- matrices are simultaneously diagonalizable, nvars(basering)>=dimension of the matrices
Example:
| LIB "VecField.lib";
ring r = 0,(x(1),x(2),x(3),x(4)),dp;
matrix a[4][4] = 2,0,0,0, 0,3,0,0, 0,0,3,0, 0,0,0,5 ;
matrix b[4][4] = 6,0,0,0, 0,6,0,0, 0,0,2,0, 0,0,0,7 ;
matrix trafo[4][4] = 3,3,0,0, 0,1,3,0, 2,0,1,0, 0,2,2,3;
matrix invtrafo = inverse(trafo);
matrix at = invtrafo * a * trafo;
matrix bt = invtrafo * b * trafo;
list l;
l = insert(l,at);
l = insert(l,bt);
matrix diagtrafo = diagonalizeMatrixSimul(l);
|
|