%%%% Sta of "RREF-Complexes.Lisp.txt" ;; Uses a semicolon ";" to start a comment. ;; Use "::::" to indicate a new problem or section. ;; Use "%" for the Lisp prompt. :::: Reducing a Complex-matrix :::: % (use-ring GaussRational-ring) % (setq G (mat-make-initseq 3 3 (list 1 #C(-2 -2) #C(1 -1) #C(-1 -2) #C(1 -1) #C(-1 -1) #C(0 -1) #C(-2 -2) #C(-1 1) ))) [ 1 -2-2i 1-i ] [ -1-2i 1-i -1-i ] [ -i -2-2i -1+i ] % (rref-mtab-beforecol G :stepwise t) Reducing column-0 produces c0 c1 c2 Row operations |------------------| r0 | 1 -2-2i 1-i | 1 0 0 r1 | 0 3-7i 2 | 1+2i 1 0 r2 | 0 -4i 2i | i 0 1 |------------------| Reducing column-1 produces c0 c1 c2 Row operations |------------------------------| r0 | 1 0 (21/29)-(9/29)i | (5/29)+(2/29)i (-4/29)+(10/29)i 0 r1 | 0 1 (3/29)+(7/29)i | (-11/58)+(13/58)i (3/58)+(7/58)i 0 r2 | 0 0 (-28/29)+(70/29)i | (-26/29)+(7/29)i (-14/29)+(6/29)i 1 |------------------------------| Reducing column-2 produces c0 c1 c2 Row operations |------------------| r0 | 1 0 0 | (-1/14)-(1/14)i (-2/7)+(2/7)i (3/14)+(3/14)i r1 | 0 1 0 | (-1/7)+(1/7)i (1/14)+(1/14)i (-1/14)+(1/14)i r2 | 0 0 1 | (3/14)+(2/7)i (1/7)+(1/7)i (-1/7)-(5/14)i |------------------| JK: Found 3 pivots before the third column. % (setq InvG (MTB-ROM *Tab*)) [ (-1/14)-(1/14)i (-2/7)+(2/7)i (3/14)+(3/14)i ] [ (-1/7)+(1/7)i (1/14)+(1/14)i (-1/14)+(1/14)i ] [ (3/14)+(2/7)i (1/7)+(1/7)i (-1/7)-(5/14)i ] % (mat-mul InvG G) ;;Checking, by multiplying. [ 1 0 0 ] [ 0 1 0 ] [ 0 0 1 ] %%%% End of "RREF-Complexes.Lisp.txt"