matrix function



>
> (%i1) n: matrix();
> (%o1)                              matrix()
> (%i3) length(n);
> (%o3)                                  0
> (%i4) n2: matrix([]);
> (%o4)                             matrix([])
> (%i6) length(n2);
> (%o6)                                  1
>

Maxima is treating matrix() as a 0x0 matrix and matrix([]) as a 1x0 matrix.
In general, matrix([],[],...) is an mx0 matrix.  There is no way to
represent a 0xn matrix (n>0).
Maxima is moderately consistent in its treatment of these trivial matrices:

   m() . m() => m()
   m() . m([]) => m()
   m([]) . m() => m([])
   m() . m([], []) => m()
   m([],[]) . m() => m([],[])
   m([]) . m([],[]) => incompatible dimensions
etc.

but not completely, and I suspect that no special effort is being made for
these cases.

    transpose(matrix([],[])) => matrix()  -- no representation for 0x2
    load(linearalgebra)$
    matrix_size(matrix([])) => internal error

If these are actually useful in some real application (if only for
consistency in some trivial cases), we should probably define some
representation for 0xn and make sure to have relevant test cases in the test
suite. If not, we can just leave the status quo in the usual informal Maxima
style or perhaps give an error when generating mx0 matrices.

                -s