O16-070 > restart; > with(linalg); [BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, coldim, colspace, colspan, companion, concat, cond, copyinto, crossprod, curl, definite, delcols, delrows, det, diag, diverge, dotprod, eigenvals, eigenvalues, eigenvectors, eigenvects, entermatrix, equal, exponential, extend, ffgausselim, fibonacci, forwardsub, frobenius, gausselim, gaussjord, geneqns, genmatrix, grad, hadamard, hermite, hessian, hilbert, htranspose, ihermite, indexfunc, innerprod, intbasis, inverse, ismith, issimilar, iszero, jacobian, jordan, kernel, laplacian, leastsqrs, linsolve, matadd, matrix, minor, minpoly, mulcol, mulrow, multiply, norm, normalize, nullspace, orthog, permanent, pivot, potential, randmatrix, randvector, rank, ratform, row, rowdim, rowspace, rowspan, rref, scalarmul, singularvals, smith, stackmatrix, submatrix, subvector, sumbasis, swapcol, swaprow, sylvester, toeplitz, trace, transpose, vandermonde, vecpotent, vectdim, vector, wronskian] > N:=proc(a) > sqrt(trace(evalm(transpose(a)&*a))) end; N := proc(a) sqrt(trace(evalm(transpose(a) `&*` a))) end > a:=matrix(4,4,(i,j)->i+j);b:=matrix(4,4,(i,j)->i*j);c:=evalm(a&*b);d:=matrix(4,4,(i,j)->i-j); [2 3 4 5] [ ] [3 4 5 6] a := [ ] [4 5 6 7] [ ] [5 6 7 8] [1 2 3 4] [ ] [2 4 6 8] b := [ ] [3 6 9 12] [ ] [4 8 12 16] [40 80 120 160] [ ] [50 100 150 200] c := [ ] [60 120 180 240] [ ] [70 140 210 280] [0 -1 -2 -3] [ ] [1 0 -1 -2] d := [ ] [2 1 0 -1] [ ] [3 2 1 0] > N(a),N(b),N(c),N(d); 2 sqrt(110), 30, 60 sqrt(105), 2 sqrt(10) >