The random command can be used in various ways to make random
matrices. We could assemble random polynomials into a doubly nested list
and use matrix to enter them into a matrix.
As usual, the degrees of the basis elements of the source and target
of the map are determined from the polynomials' degrees. Alternatively,
one could generate a free module with the appropriate degrees and use
random to insert random matrix entries of the appropriate
degree so as to make the matrix homogeneous.