array, list or matrix



Maxima supports lists and matrices as first-class objects, well
integrated into the overall structure and semantics of the system. 
Arrays, on the other hand, are a low-level construct with semantics
which are idiosyncratic at best.  I do not recommend using arrays
unless efficiency is a real problem (not an imagined or projected
problem) because they are very badly integrated into Maxima as a
whole.  So I strongly recommend you avoid arrays and stick with lists,
lists of lists, and matrices.

Lists are of the form [a, b, ...].  The empty list = the list of
length 0 = [].  Lists can have arbitrary objects as elements,
including other lists.

Matrices are of the form matrix( [a, b, ...], [g, h, ...], ...).  All
rows must be of the same length.  Matrices can have arbitrary objects
as elements.  Each row of a matrix is a list.

Lists and matrices are both mutable objects, that is, you can modify
parts of them in place.  (Note that this is *not* true of most Maxima
objects.)  They can be assigned or locally bound to variables, passed
as function parameters, and returned as function results.  They can be
printed out and read in.

If M is a matrix, the list of rows is args(M).  The list of columns is
args(transpose(M)).  Note that transpose must create a new copy of the
matrix, and so is not very efficient.  Element m,n is M[m,n]. Row n is
M[n].  Column n is col(M,n).  Rows can be assigned to (e.g.
M[2]:[q,r]), but columns cannot. The number of rows in a matrix is
length(M).  The number of columns is length(M[1]).

Hope this helps.

         -s