Converting Multivariate polynomial to a matrix If I have a multivariate polynomial $$7(1+x+x^2)(1+y+y^2+y^3+y^4)(1+z+z^2)-12x^2y^4z^2=0$$  is there a way to write this in matrix form?
 A: You can always associate a polynomial of degree $n$ with vectors of degree $n+1$ via
$$\sum_{i=0}^n a_ix^i \mapsto \begin{pmatrix} a_0 \\ \vdots \\ a_n \end{pmatrix}$$
e.g. $1 + y + y^2 + y^3 + y^4$ would correspond to the element $(1,1,1,1,1)^T \in \mathbb{R}^5$. If you know about tensor products you can view your polynomial as an element of $\mathbb{R}^3\otimes\mathbb{R}^5\otimes \mathbb{R}^3$, namely
$$7 \begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} \otimes \begin{pmatrix} 1 \\ 1 \\ 1 \\1 \\ 1\end{pmatrix} \otimes \begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} - 12\begin{pmatrix} 0 \\ 0 \\ 1\end{pmatrix} \otimes \begin{pmatrix} 0 \\ 0 \\ 0 \\0 \\ 1\end{pmatrix} \otimes \begin{pmatrix} 0 \\ 0 \\ 1\end{pmatrix}$$
Using the fact that the tensor product is associative and that $v \otimes w$ can be thought of as $vw^T$ (i.e. a matrix), you can view your polynomial as a $\mathbb{R}^{3\times 15}$ matrix $A$. Now your polynomial is given by
$$P(x,y,z) = \xi^TA\zeta$$
where $\xi = (1,x,x^2)^T$ and $\zeta$ is a vector in $\mathbb{R}^{15}$ with entries $y^iz^j$ for $i = 0, \dots, 4$ and $j = 0, 1, 2$. 
If you don't know about tensor products you can construct the matrix $A$ explicitly as follows:
The entries of $A$ are indexed by $k$ and pairs of the form $(i,j)$ where $k,j = 0, 1, 2$ and $j = 0, \dots, 4$. The entry $a_{k,(i,j)}$ corresponds to the monomial $x^ky^iz^j$. If you write your polynomial in terms of monomials, the entry $a_{k,(i,j)}$ is given by the scalar factor infront of $x^ky^iz^j$. This again gives you a $\mathbb{R}^{3\times 15}$ matrix such that $P(x,y,z) = \xi^TA\zeta$.
