>    with(linalg);

Warning, the protected names norm and trace have been redefined and unprotected

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...
[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldi...

>    is_unitary:=U -> equal(htranspose(U),inverse(U));
is_hermitian:=H->equal(htranspose(H),H);
is_posDefinite:=P->definite(P,'positive_def');

is_unitary := proc (U) options operator, arrow; equal(htranspose(U),inverse(U)) end proc

is_hermitian := proc (H) options operator, arrow; equal(htranspose(H),H) end proc

is_posDefinite := proc (P) options operator, arrow; definite(P,'positive_def') end proc

>    ### Matrix A

>    A := linalg[fibonacci](5);

A := matrix([[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 1, 1, 1, 0], [1, 1, 1, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 1, 0, 1], [1, 1, 1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 0, 0, 0], [1, 1,...

>    ASigma := evalf(Svd(A,AU,AV));

ASigma := vector([5.457705396, 2.414213562, 1.790863601, 1.000000000, .7485606534, .6317511764, .4142135624, .2163487282])

>    evalm(AU);

matrix([[-.5050479011, -.2204385761e-15, .2428995457, -.5138828578e-15, -.1932250219e-1, .7162211272, -.5081537159e-15, -.4154279315], [-.3477647637, .3535533906, -.3399653213, .5000000000, -.119036977...

>    evalm(AV);

matrix([[-.5050479011, .6253317376e-16, -.2428995457, .2324944772e-15, -.1932250219e-1, -.7162211272, .5786190565e-16, -.4154279315], [-.3477647637, -.3535533906, .3399653213, -.5000000000, -.119036977...

>    is_unitary(A);

false

>    is_hermitian(A);

true

>    is_posDefinite(A);

false

>    inverse(A);

matrix([[0, -1, 0, 0, 1, -1, 1, 1], [-1, 1, 0, 1, -1, 1, -1, 0], [0, 0, 0, 0, 0, 1, 0, -1], [0, 1, 0, 0, -1, 0, 0, 0], [1, -1, 0, -1, 1, 0, 0, 0], [-1, 1, 1, 0, 0, 1, -1, -1], [1, -1, 0, 0, 0, -1, 1, 0...

>    cond(A);

>   

48

>    ### Matrix B

>    B := linalg[hilbert](8);

B := matrix([[1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8], [1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9], [1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10], [1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11], [1/5, 1/6, 1/7, 1/8...

>    BSigma := evalf(Svd(B,BU,BV));

BSigma := vector([1.695938997, .2981252113, .2621284357e-1, .1467688117e-2, .5436942608e-4, .1294324555e-5, .1799724233e-7, .1100035493e-9])

>    evalm(BU);

matrix([[-.7202713694, .6294839403, .2775472509, -.8651703045e-1, .2065557458e-1, -.3810631485e-2, .5238169574e-3, .4715729684e-4], [-.4325260154, -.1256708516, -.6449284774, .5501381905, -.2661258906,...

>    evalm(BV);

matrix([[-.7202713694, .6294839403, .2775472509, -.8651703045e-1, .2065557458e-1, -.3810631485e-2, .5238169574e-3, .4715729672e-4], [-.4325260154, -.1256708516, -.6449284774, .5501381905, -.2661258906,...

>    is_unitary(B);

false

>    is_hermitian(B);

true

>    is_posDefinite(B);

true

>    inverse(B);

matrix([[64, -2016, 20160, -92400, 221760, -288288, 192192, -51480], [-2016, 84672, -952560, 4656960, -11642400, 15567552, -10594584, 2882880], [20160, -952560, 11430720, -58212000, 149688000, -2043241...

>    cond(B);

>   

33872791095

>