# Math 221 Current Assignment

## Due Monday, September 23

This is first use of Maple by Professor Barbasch's class, so support is especially valuable.
People may not understand the interface very well, so be prepared to explain
it. Opening up sample scratchpads (especially **Basic Linear Algebra**
from the Math 221 folder is very natural.)

The students need to produce elementary matrices for the assigment, so be
prepared to help with syntax. The command

**G := diag(1,1,1,1);**
produces a 4 by 4 identity, and then an assignment like
**G[4,1] := 3;**
would just change the entry in row 4 column 1.
One could also use copy and paste with the normal matrix creation command.

**G := matrix(3,2,[[1,2],[3,4],[5,6]]);**

## Linear Algebra Problems

**The linear algebra package needs to be loaded.**

**Better:**

**Linear algebra operations need to be wrapped inside evalm to be computed.**

**Better:**

**Scalar Multiplication uses * rather than &***

**Better:**

**Algebraically substituting in a matrix requires more than the subs function.**

**As usual, to do something to each entry of a matrix, use the ***map* function.

** A more elegant solution might be:****
**

**
**
** A more dangerous version of substitution without using map will also
work in this case, as long as you use eval to fully evaluate the matrix.****
**

**
****By default, matrices and other table based data structures in Maple are not
fully evaluated. This is to protect the user from a barrage of unwanted data.
When one wishes to look inside a matrix, one can use eval. (Or just print,
if only visual inspection is desired.)
**

**
**

**
**

** ( The immediately above line is dangerous because most Maple commands
will not work on compound objects like matrices unless used with the map function. )
**

[Home Page | Support Page| Some Common Maple Errors ]
Last Update: * September 19, 1996*