| int ro = 3;
ring r = 32003,(x,y,z),dp;
poly f=xyz;
poly g=z*f;
ideal i=f,g,g^2;
matrix m[ro][3] = x3y4, 0, i, f ; // a 3 x 3 matrix
m;
==> m[1,1]=x3y4
==> m[1,2]=0
==> m[1,3]=xyz
==> m[2,1]=xyz2
==> m[2,2]=x2y2z4
==> m[2,3]=xyz
==> m[3,1]=0
==> m[3,2]=0
==> m[3,3]=0
print(m);
==> x3y4,0, xyz,
==> xyz2,x2y2z4,xyz,
==> 0, 0, 0
matrix A; // the 1 x 1 zero matrix
matrix B[2][2] = m[1..2, 2..3]; //defines a submatrix
print(B);
==> 0, xyz,
==> x2y2z4,xyz
matrix C=m; // defines C as a 3 x 3 matrix equal to m
print(C);
==> x3y4,0, xyz,
==> xyz2,x2y2z4,xyz,
==> 0, 0, 0
|