ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 03 May 2016 20:04:31 +0200Help with matrices over multivariable polynomial ringhttps://ask.sagemath.org/question/33310/help-with-matrices-over-multivariable-polynomial-ring/ I want to work with matrices over a multivariable polynomial ring.
I want the matrix
[x0^2,x1^2,x2^2]<br>
[x0^4,x1^4,x2^4]<br>
[x0^8,x1^8,x2^8]
so I can take the determinate of it. I have
R = PolynomialRing(GF(2), 3, 'x')
which is a "Multivariate Polynomial Ring in x0, x1, x2 over Finite Field of size 2". I try
M = MatrixSpace(R,3,3,sparse=True)
which is the "Full MatrixSpace of 3 by 3 sparse matrices over Multivariate Polynomial Ring in x0, x1, x2 over Finite Field of size 2". I am not even sure what "sparse" is.
Then I try
A = M([x0^2,x1^2,x2^2, x0^4,x1^4,x2^4, x0^8,x1^8,x2^8])<br>
or<br>
A = M([[x0^2,x1^2,x2^2], [x0^4,x1^4,x2^4], [x0^8,x1^8,x2^8]])
And it says "name 'x0' is not defined"
I have looked for examples in the Sage documentation, but I just can get Sage to make the matrix above.
Eventually, I want to do arbitrate number of variables and arbitrary n-by-n matrices.
Thank you for your help. MrotsliahTue, 03 May 2016 20:04:31 +0200https://ask.sagemath.org/question/33310/