Matrix You use the with statement to acess the linalg package > with(linalg); Warning, new definition for norm Warning, new definition for trace [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, stack, submatrix, subvector, sumbasis, swapcol, swaprow, sylvester, toeplitz, trace, transpose, vandermonde, vecpotent, vectdim, vector, wronskian] 1. You enter a matrix with the matrix command: > A := matrix(4,4, [[1,2,3,4],[2,3,0,-5],[2,-1,1,1],[-2,2,0,-5]]); [ 1 2 3 4] [ ] [ 2 3 0 -5] A := [ ] [ 2 -1 1 1] [ ] [-2 2 0 -5] > A; A > evalm(A); [ 1 2 3 4] [ ] [ 2 3 0 -5] [ ] [ 2 -1 1 1] [ ] [-2 2 0 -5] 2. You can interchange two rows: > B := swaprow(A, 3, 4); [ 1 2 3 4] [ ] [ 2 3 0 -5] B := [ ] [-2 2 0 -5] [ ] [ 2 -1 1 1] The swapcol command is used to interchange two columns: 3. You can add A and B: > evalm(A+B); [2 4 6 8] [ ] [4 6 0 -10] [ ] [0 1 1 -4] [ ] [0 1 1 -4] 4. Find the inverse of A: > inverse(A); [ -1 -28] [ -- 1/5 1/9 ---] [ 27 135] [ ] [ -23] [4/27 1/5 -4/9 ---] [ 135] [ ] [ 58 ] [4/27 -1/5 5/9 ---] [ 135] [ ] [ -5 ] [2/27 0 -2/9 -- ] [ 27 ] > multiply(A, "); [1 0 0 0] [ ] [0 1 0 0] [ ] [0 0 1 0] [ ] [0 0 0 1] 5. Maple can transpose matrices: > transpose(A); [1 2 2 -2] [ ] [2 3 -1 2] [ ] [3 0 1 0] [ ] [4 -5 1 -5] 6. The determinant of a matrix is easily obtained: > det(A); 135 >