You can load this session from /home/ceng303/maple/sessions as: ch3_4.mw


Session 3.4 Using the Linear Algebra Package for Simple Operations

> restart;

> a:=array([[1,2],[3,4],[5,6]]);

a := matrix([[1, 2], [3, 4], [5, 6]])

> b:=array([[x,x],[y,y],[z,z]]);

b := matrix([[x, x], [y, y], [z, z]])

> with(linalg):

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

> matadd(a,b);adding elements in the matrices

The addition of two matrices

matrix([[1+x, 2+x], [3+y, 4+y], [5+z, 6+z]])

> transpose(a);

The transpose of matrix a

matrix([[1, 3, 5], [2, 4, 6]])

> multiply(transpose(a),b);

Multiply the transpose of matrix a with matrix b

matrix([[x+3*y+5*z, x+3*y+5*z], [2*x+4*y+6*z, 2*x+4*y+6*z]])

>