Home Online Manual
Top
Back: orthogonalize
Forward: busadj
FastBack: matrix_lib
FastForward: Commutative algebra
Up: linalg_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.3.2.6 diag_test

Procedure from library linalg.lib (see linalg_lib).

Usage:
diag_test(A); A = const square matrix

Return:
int, 1 if A is diagonalizable,
0 if not
-1 if no statement is possible, since A does not split.

Note:
The test works only for split matrices, i.e if eigenvalues of A are in the ground field.
Does not work with parameters (uses factorize,gcd).

Example:
 
LIB "linalg.lib";
ring r=0,(x),dp;
matrix A[4][4]=6,0,0,0,0,0,6,0,0,6,0,0,0,0,0,6;
print(A);
==> 6,0,0,0,
==> 0,0,6,0,
==> 0,6,0,0,
==> 0,0,0,6 
diag_test(A);
==> 1