CHAPTER 3

Maple Arrays and Linear Algebra


The following topics will be covered:

3.1 Discussion
3.2 Array Definition
3.3 Linear Algebra
3.4 Matrix Algebra

3.1 Discussion

Sets and lists of objects can be defined in Maple, but care must be taken to distinguish between them. Sets are unordered, distinct expressions and are defined with braces. Lists are ordered sequences of expressions and appear enclosed in square brackets. Since there is an order to sets, we can extract the kth expression in them. Session 3.1 shows several sets and lists and some properties of each.

Indexing to locate individual elements in a1 is accomplished by first extracting a list from the outermost list and then getting an element in that list.

A very general arrangement of information in Maple is called a table. The help file for table gives some idea of the generality of such a structure. A special type of table is an array in which indexing of elements is done with integers. Arrays will be treated in this chapter, but many properties and techniques will be touched on only briefly. You should read the chapter on ``Arrays and Tables" in the Maple Language Reference Manual and use help to see what is stored on-line about Arrays, Lists, Sets and Tables if you need to make serious use of such structures. Here is part of what you may see if you ask for help on Tables:

We will be content in this chapter to look at the ways in which we can construct vectors and matrices and use them to solve engineering problems. We already know how to do this in MATLAB for numeric arrays, but we will find that Maple gives us ways to handle symbolic problems. In order to solve many problems of interest to engineers, we will need to be able to manipulate our arrays according to the laws of linear algebra. This will require the functions in the linear algebra package so that package must be loaded before we start such manipulations.


3.2 Array Definition

Use: ?array to understand some of the many ways that arrays may be formed in Maple. A three row by two column numeric array may be formed from the list a1 defined earlier in this chapter as shown in session 3.2.


3.3 Linear Algebra

Loading the linear algebra package is demonstrated in session 3.3.


3.4 Matrix Algebra

Once we have defined arrays and loaded the linear algebra package, there are many operations that we can perform. A few of these are shown in session 3.4.
 


Return to Table of Contents