From time to time I find myself in the following situation. I have generated a list of polynomials from some ring $R=\mathbb R[x_1,\ldots,x_n]$ and now I wish to view these polynomials as vectors in the linear space $R$. Most commonly, I'm interested in the dimension of the subspace in $R$ spanned by these polynomials, so let us concentrate on this specific task.
Of course, one may explicitly convert each polynomial into a vector with the likes of MonomialList
or CoefficientList
, turn the list of polynomials into a matrix and find its rank... This is what I've been doing so far but it (the first step that is) does seem a bit tedious given how simple and natural my goal is. Might there exist a neater way? Either with the use of some built-in functionality that I'm not finding or of some (reasonably) dirty trick?
1+x+x y+x^2+x y^2+x^4 y^3
? $\endgroup${{1,2,0,0,0,0,0},{0,1,1,1,0,0,0},{0,0,0,0,1,1,0},{0,0,0,0,0,0,1}}
. The rank of this matrix is the dimension of the linear span. The less zero columns are added, the better. $\endgroup$