I'm trying to view the monomials of a two-variable polynomial in vector form. So, for example, if I input x^2 + x^3*y + x*y + y^2 + 1
, I would like to view it as [[2;0], [3;1], [1;1], [0;2], [0;0]]
- a vector made of column vectors.
If I use Vec
on a two-variable polynomial, it simply treats the second variable as a number, giving Vec( x^2 + x^3*y + x*y + y^2 + 1 ) = [ y, 1, y, y^2 + 1 ]
, which I don't think can then be twisted into something that would work for me.
Any ideas on how this might be able to be done?