# Revision history [back]

### Linear transformation from polynomials

Suppose I have an unspecified list of degree 1 polynomials in several variables, say [X1,X2,X3+3*X4,X0]

A priori I don't know how many variables or polynomials I will have, since they are found depending on some previous parameters.

My question is: How can I transform this list of polynomials into a matrix/linear transformation?

I've tried collecting the coefficients, but the .coefficients() does not work really well for multivariable polynomials since it does not "see the zero terms" (at least I don't know how to do that).

### Linear transformation from polynomials

Suppose I have an unspecified list of degree 1 polynomials in several variables, say [X1,X2,X3+3*X4,X0][X1,X2,X3+3*X4,X0].

A priori I don't know how many variables or polynomials I will have, since they are found depending on some previous parameters.parameters. The variables are the generators of a polynomial ring V = PolynomialRing(QQ, dim,'X').

My question is: How can I transform this list of polynomials into a matrix/linear transformation?

I've tried collecting the coefficients, but the .coefficients() does not work really well for multivariable polynomials since it does not "see the zero terms" (at least I don't know how to do that).

### Linear transformation from polynomials

Suppose I have an unspecified list of degree 1 homogeneous polynomials in several variables, say [X1,X2,X3+3*X4,X0].[X1,X2,X3+3X4,X0]. This list will define a linear transformation [X0,X1,X2,X3,X4]|---->[X1,X2,X3+3X4,X0].

A priori I don't know how many variables or polynomials I will have, since they are found depending on some previous parameters. The (The way I have done this, the variables are the generators of a polynomial ring V = PolynomialRing(QQ, dim,'X').dim,'X').)

My question is: How can I transform this list of polynomials into a matrix/linear transformation?

I've tried collecting the coefficients, but the .coefficients() does not work really well for multivariable polynomials since it does not "see the zero terms" (at least I don't know how to do that).