skywalker
skywalker

Reputation: 33

Matrix with polynomials entries in Julia

I just began learning Julia and especially the package AbstractAlgebra.jl.

I succeeded in creating rings of polynomials: n=15 (for example, but I would like to do it for different ns)

T, x = PolynomialRing(ZZ, n, "x")
S, y = PolynomialRing(T, n , "y")

Now I would like to define a matrix with entries x[i]*y[j], for example with

M = [[x[i]*y[j] for i=1:n] for j=1:8]

but I realized this defines an array of arrays and NOT a matrix, so that I cannot compute its determinant, via

det(M)

How can I successfully define my polynomial matrix so that det(M) is a well defined polynomial in my ring S?

Upvotes: 1

Views: 129

Answers (1)

jling
jling

Reputation: 2301

julia> M = [x[i]*y[j] for i=1:n, j=1:8]
15×8 Matrix{AbstractAlgebra.Generic.MPoly{AbstractAlgebra.Generic.MPoly{BigInt}}}:
 x1*y1   x1*y2   x1*y3   x1*y4   x1*y5   x1*y6   x1*y7   x1*y8
 x2*y1   x2*y2   x2*y3   x2*y4   x2*y5   x2*y6   x2*y7   x2*y8
 x3*y1   x3*y2   x3*y3   x3*y4   x3*y5   x3*y6   x3*y7   x3*y8
 x4*y1   x4*y2   x4*y3   x4*y4   x4*y5   x4*y6   x4*y7   x4*y8
 x5*y1   x5*y2   x5*y3   x5*y4   x5*y5   x5*y6   x5*y7   x5*y8
 x6*y1   x6*y2   x6*y3   x6*y4   x6*y5   x6*y6   x6*y7   x6*y8
 x7*y1   x7*y2   x7*y3   x7*y4   x7*y5   x7*y6   x7*y7   x7*y8
 x8*y1   x8*y2   x8*y3   x8*y4   x8*y5   x8*y6   x8*y7   x8*y8
 x9*y1   x9*y2   x9*y3   x9*y4   x9*y5   x9*y6   x9*y7   x9*y8
 x10*y1  x10*y2  x10*y3  x10*y4  x10*y5  x10*y6  x10*y7  x10*y8
 x11*y1  x11*y2  x11*y3  x11*y4  x11*y5  x11*y6  x11*y7  x11*y8
 x12*y1  x12*y2  x12*y3  x12*y4  x12*y5  x12*y6  x12*y7  x12*y8
 x13*y1  x13*y2  x13*y3  x13*y4  x13*y5  x13*y6  x13*y7  x13*y8
 x14*y1  x14*y2  x14*y3  x14*y4  x14*y5  x14*y6  x14*y7  x14*y8
 x15*y1  x15*y2  x15*y3  x15*y4  x15*y5  x15*y6  x15*y7  x15*y8

you still can't compute determinant because this is not a symbolic calculation system it seems.

Upvotes: 2

Related Questions