Factorization of polynomial in multiple variables by a root Let $A$ be a ring and consider the polynomial ring in $n$ variables $A[x_1,\ldots,x_n]$. Let $f\in A[x_1,\ldots,x_n]$. If we have that  $f(a_1,\ldots,a_n)=0$ for $a_i\in A$, then I was wondering, if it's true, that we can factorize $f$ as $f(x_1,\ldots,x_n)=b_1(x_1,\ldots,x_n)(x_1-a_1)+\ldots+b_n(x_1,\ldots,x_n)(x_n-a_n)$ for $b_i(x_1,\ldots,x_n)\in A[x_1,\ldots,x_n]$?
 A: If $k$ is a field and $p$ is a point, then the set of all polynomials of $k[x_1,\dots,x_n]$ which vanish at $p$ form a maximal ideal, sometimes called $m_p$.  With a little work, one can show that 
$$
m_p=\langle x_1-p_1,x_2-p_2,\dots,x_n-p_n \rangle.
$$
In your case (if $A$ is a field), then you're starting with a polynomial in $m_p$, and since $m_p$ is generated by the linear terms $x_i-p_i$, there is a representation as you describe.
If $A$ is not a field in your case, but a more general ring, then some of these facts break down (e.g., consider the maximal ideals of $\mathbb{Z}[x]$).
For general rings, if you write $f(x_1,\dots,x_n)$ as $x_1f_1(x_1,\dots,x_n)+g_1(x_2,\dots,x_n)$, then
$$
f(x_1,\dots,x_n)-f_1(x_1,\dots,x_n)(x_1-p_1)=p_1f_1(x_1,\dots,x_n)+g_2(x_2,\dots,x_n),
$$
which has a lower degree in $x_1$.  By continuing in this way, you can subtract all $x_1$ terms, then the $x_2$ terms, and so on.  Therefore, we may write
$$
f(x_1,\dots,x_n)-h(x_1,\dots,x_n)=c
$$
where $h\in \langle x_1-p_1,\dots,x_n-p_n\rangle$ and $c\in A$.  By substituting $p$ into this equation, the LHS vanishes, so $c=0$.  Hence $f$ can be written as you describe.
