Info Linear Algebra I

Section E01, E'00

Exercise 1
Exercise 2 Exercise 3 Exercise 4 Exercise 5

Back to Maple Exercises

Maple Exercise No 1
MATRICES


A. Relevant Maple Commands

The work with majority of Maple linear algebra commands starts with the loading of the package linalg:

> with(linalg);

Matrix definitions in Maple are as follows:

> M := matrix(4,4,[1,2,3,4,-1,-2,-3,-4,5,6,7,8,-5,-6,-7,-8]);
> A := matrix(3,3,[1,-2,-3,2,-2,3,3,-3,3]);
> B := matrix(3,3,[2,3,6,3,3,6,6,6,6]);
> C := matrix(3,2,[2,4,0,4,1,4]);

Alternative ways to define a matrix:

> A := matrix(3,3,[[1,-2,-3],[2,-2,3],[3,-3,3]]);
> A := matrix([[1,-2,-3],[2,-2,3],[3,-3,3]]);

For compatible-size matrices A and B the following commands are appllied. To add matrices:

> evalm(A+B);

Algebraic expressions with matrices are evaluated by the same command evalm. For example, for 2A - 3B:

> evalm(2*A-3*B);

Notice that the scalar multiplication of matrices is defined by traditional Maple symbol *. To distinguish matrix multiplication, the symbol &* is used:

> evalm(A&*B);

The transpose and inverse of a matrix can be found respectively by:

> transpose(A);
> inverse(A);

Maple is able to return an augmented matrix. Given a matrix v1 and a vector v2, the augmented matrix built from them is obtained with the use of the command:

> augment(v1,v2);

To denote the range m, m + 1, ..., n, Maple uses m..n

Matrix powers are also denoted by ^.

B. Maple Exercises

For matrices A, B, C, M defined above do the following:

  1. Compute (AB)² and A²B². Compare and comment results.
  2. Compute the inverse of matrix of A by:
    • a Maple command;
    • row-reducing [A : I].
    Compare and comment answers.
  3. Verify the identities (A^T)^T = A and (ABC)^T = (C^T)(B^T)(A^T)

[ Back on the Top ]

[ Back to COURSE MAPLE EXERCISES ]

[ Exercise 1 | Exercise 2 | Exercise 3 | Exercise 4 | Exercise 5 ]

[ Course Information | Homework Assignments | Mini Projects | Maple Exercises | What's New? ]

[WPI HomePage] Department of Mathematical Sciences Back to Vadim Yakovlev's Professional Page


vadim@wpi.edu
Last modified: Mon, June 5, 2000