Factoring polynomial in two variables. Given a polynomial $P(x,y)$ I would like to know what the criteria are for factoring out linear factors.
For instance, in one variable, if $Q(a) = 0$, then one may say $Q(x) = (x-a)R(x)$. In two variables this is not true, as shown by $P(x,y) = x^2+y^2$ one has $P(0,0)=0$ but one cannot factor out anything.
When can one factor out a linear factor from a polynomial in two variables?
 A: I have a reference which cites this theorem for real polynomials, but if I go through the proof perhaps this also works over other fields/euclidean domains possibly. Here it is :
Theorem. Let $f(x,y)$ be a polynomial with real coefficients and degree $d$. Let $a,b,c$ be real numbers, and let $L$  denote the set of points $(x,y)$ for which $ax + by + c = 0$. If the curve $f(x,y) = 0$ and $L$ have strictly more than $d$ distinct points in common, then there exists $k(x,y)$ with real coefficients such that 
$$
f(x,y) = (ax+by+c)k(x,y).
$$
This is in Niven & Zuckerman's Introduction to the theory of numbers, so it's not focused on algebra. I'll edit this answer later if I see a reason why this would hold over some other fields, but the proof uses mainly the Taylor expansion of the polynomial (which can be done formally, without using differentiation in the "limit" sense).
Hope that helps,
A: The Factor Theorem remains applicable, for example
$\rm\qquad x-a\ |\ f(x) \iff f(a) = 0\ \ $ for $\rm\:a = by+c \in R[y]\:$ is
$\rm\qquad x-by-c\ |\ f(x,y)\iff f(by+c,\:y) = 0$
e.g. $\rm\ x-y\ |\ f(x) - f(y)\ \:$ since $\rm\ f(y)-f(y) = 0 $
