A matrix in Macaulay is a matrix of polynomials over some polynomial ring. In this chapter, we describe the operations available for computing with matrices which don't require standard bases. These range from matrix input and output, to simple operations such as addition and multiplication of matrices, to relatively esoteric operations such as koszul or contract.
Matrices have several interpretations in Macaulay. Let M be an m
by n matrix of polynomials over the ring R. There are two
R-modules which we can associate to M. First, the submodule
is the submodule of
generated by the columns of the
matrix M. This interpretation is used heavily when dealing with
standard (Gröbner) bases. We call I the ``submodule generated by the
columns of the matrix M''. The second module corresponding to M is the
module N which is presented by M. That is, The R-module N has m
generators, one for each row of M, and the relations between these
generators are exactly the columns of the matrix M. This interpretation
is used often, although not as much as the first. For example, the
hilb command computes the Hilbert series of the module presented by
a matrix.
Each matrix in Macaulay must be defined over a specific base ring. This is required so that the standard basis and syzygy computations which are the heart of Macaulay can be highly optimized. Every command in this chapter (indeed, every command of Macaulay) can be used with all rings of Macaulay. In particular, each command works fine over a quotient ring.
Every operation described in this chapter remains valid even if the input matrices are not graded. In fact, the only commands of Macaulay\ where this is false are the computation commands (see Chapter 7).
Some additional notes valid for all matrix commands:
The following two commands display the number of rows or columns of a given matrix. They are most useful in conjunction with scripts. See also the numinfo and betti commands: they display more information.