Here a few commands for making various sorts of generic matrices. A generic matrix is one whose entries are independent variables from the ring, subject to certain relations.
We begin by making a ring with enough variables to accomodate all the examples.
i1 : R = ZZ/101[a..z]; |
We can make a general generic matrix with genericMatrix. We specify the ring, the starting variable and the dimensions.
i2 : genericMatrix(R,c,3,5) |
We can also make a skew symmetric matrix with genericSkewMatrix or a symmetric matrix with genericSymmetricMatrix.
i3 : R = ZZ/101[a..i]; |
i4 : genericSkewMatrix(R,c,3) |
i5 : gs = genericSymmetricMatrix(R,a,3) |
Suppose we need a random symmetric matrix of linear forms in three variables. We can use random and substitute to obtain it from the generic symmetric matrix gs above.
i6 : S = ZZ/101[x,y,z]; |
i7 : rn = random(S^1, S^{9:-1}) |
i8 : substitute(gs, rn) |