Variable Matrices on Sage
I am using Sagemath 10. I wish to work with matrices whose entries are multivariate polynomial ring variables (nothing funky with the base ring, R = PolynomialRing(QQ, 100, 'x'); R.gens()
is what I am trying). I create a matrix.zero(n,n)
for reasonable n
(currently just 3) and then try to alter each entry manually. However, Sage complains that the entries can't be non-constant polynomials.
So I tried to provide the ring above as an argument by writing matrix.zero(R, n,n)
, but this generated the error
TypeError: unbound method Parent.category() needs an argument
I have also tried using M=MatrixSpace(R,n,n); M(L)
where L
is a list of appropriate design. It still complains about getting non-constant polynomial entries.
How do I circumvent this issue? I only plan to analyse the determinant of a specific kind of matrix. Based on this information, feel free to offer alternatives with more restricted functionality than just a matrix. Thank you!