Top
Back: mat_rk
Forward: pos_def
FastBack:
FastForward:
Up: linalg_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.3.2.15 U_D_O

Procedure from library linalg.lib (see linalg_lib).

Usage:
U_D_O(A); constant invertible matrix A

Return:
list Z: Z[1]=P , Z[2]=U , Z[3]=D , Z[4]=O
gives a permutation matrix P,
a normalized lower triangular matrix U ,
a diagonal matrix D, and
a normalized upper triangular matrix O
with P*A=U*D*O

Note:
Z[1]=-1 means that A is not regular (proc uses gaussred)

Example:
 
LIB "linalg.lib";
ring r = 0,(x),dp;
matrix A[5][5] = 10, 4,  0, -9,  8,
-3, 6, -6, -4,  9,
0, 3, -1, -9, -8,
-4,-2, -6, -10,10,
-9, 5, -1, -6,  5;
list Z = U_D_O(A);              //construct P,U,D,O s.t. P*A=U*D*O
print(Z[1]);                    //P
==> 1,0,0,0,0,
==> 0,1,0,0,0,
==> 0,0,1,0,0,
==> 0,0,0,1,0,
==> 0,0,0,0,1 
print(Z[2]);                    //U
==> 1,    0,    0,    0,         0,
==> -3/10,1,    0,    0,         0,
==> 0,    5/12, 1,    0,         0,
==> -2/5, -1/18,-38/9,1,         0,
==> -9/10,43/36,37/9, -1049/2170,1 
print(Z[3]);                    //D
==> 10,0,   0,  0,       0,      
==> 0, 36/5,0,  0,       0,      
==> 0, 0,   3/2,0,       0,      
==> 0, 0,   0,  -1085/27,0,      
==> 0, 0,   0,  0,       6871/217
print(Z[4]);                    //O
==> 1,2/5,0,   -9/10,  4/5,    
==> 0,1,  -5/6,-67/72, 19/12,  
==> 0,0,  1,   -149/36,-17/2,  
==> 0,0,  0,   1,      216/217,
==> 0,0,  0,   0,      1       
print(Z[1]*A);                  //P*A
==> 10,4, 0, -9, 8, 
==> -3,6, -6,-4, 9, 
==> 0, 3, -1,-9, -8,
==> -4,-2,-6,-10,10,
==> -9,5, -1,-6, 5  
print(Z[2]*Z[3]*Z[4]);          //U*D*O
==> 10,4, 0, -9, 8, 
==> -3,6, -6,-4, 9, 
==> 0, 3, -1,-9, -8,
==> -4,-2,-6,-10,10,
==> -9,5, -1,-6, 5  


Top Back: mat_rk Forward: pos_def FastBack: FastForward: Up: linalg_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.