The MAPLE Book

or exact computations it is advisable to use the linalg package. In this section we give an overview of the linalg package. To see all the functions in the linalg package try > with(linalg); You will notice many functions in common with the LinearAlgebra package. 9.16.1 Matrices and vectors In the linalg package, matrices and vectors are defined as in the LinearAlgebra package, except that matrix( ) and vector( ) are used instead of Matrix( ) and Vector( ). > with(linalg): > v:=vector([1,2,3]); V := [1, 2, 3] > A := matrix(2,3,[a,b,c,d,e,f]); A := [ a b c d e f ] > A := matrix(2,3,[[a,b,c],[d,e,f]]); A := [ a b c d e f ] > v; v > A; A > print(v); [1, 2, 3] > print(A); [ a b c d e f ] We used the vector and matrix functions in the linalg package to define the three-dimensional vector v and the 2 × 3 matrix A. Notice that typing v or A did not cause the vector or matrix to be displayed. We displayed them using the print command. Also, try > op(A); > eval(A); > evalm(A); © 2002 by Chapman & Hall/CRC