Given a field extension $K\subset M$ with algebraic elements in x,y: Show that g(x,y)=0 for any g Given a field-extension $K\subset M$. Let $x,y \in $ M be algebraic, 
$ f\in K[X,Y]$ and $z=f(x,y) \in M$. Show that $z$ is algebraic.
So far I got this obvious step:
Since $x$ and $y$ are algebraic so we can find a $g\in K[X,Y]$ with $g(x,y)=0$
I can't see a connection, can someone give me a hint?
I tried seeing it with a example, but i can't generalize it. 
 A: Take a moment to think, what are you doing when you evaluate $f$ on $x$ and $y$? You're just adding and multiplying them together, right? So this just boils down to showing that the algebraic elements of a field extension are a subfield of the extension (in fact, you just need to show they are a subring for the purposes of this question).
Edit: My previous proof was really hasty and totally mistaken, but the fact that the algebraic elements of an extension are a subfield follows from basic facts about field extensions. Let me sketch an argument for you here.
Edit #2: I wasn't totally happy with the second attempt either. Here I give a more fleshed out proof.
Suppose $\alpha$ and $\beta$ are algebraic. Recall that $K(\alpha) \cong K[X]/\langle \min_\alpha(x) \rangle$, where $\min_\alpha(x)$ is the minimum polynomial of the element $\alpha$ and $K(\alpha)$ is the smallest subfield of $M$ that contains $\alpha$. Now we have that $K(\alpha)$ is a vector space over $K$ of dimension equal to the degree of $\alpha$, and in particular it is spanned by the elements $1, \alpha, \alpha^2,\ldots \alpha^{n-1}$ where $n$ is the degree of $\alpha$. What this means is that $\alpha^{-1}$ is a polynomial expression in terms of $\alpha$, and so if the algebraic numbers are closed under multplication and addition, they are closed under inversion (of nonzero numbers) as well. Since $\alpha$ and $\beta$ are algebraic, it follows that $[K(\alpha,\beta):K] = [K(\alpha,\beta):K(\alpha)][K(\alpha):K]$ is finite (do you see why each factor is finite, in particular the first one?), and so $K(\alpha,\beta)$ is algebraic. Therefore $\alpha + \beta$ and $\alpha\beta$ are algebraic over $K$, and we are done. For additional proofs of this fact you can look at this thread, from which I adapted the proof presented here.
A: If $x, y \in M$ are each algebraic over $K$, then of course
$K(x), K(y) \subset M \tag 1$
and 
$[K(x):K] = n, [K(y):K] = m < \infty; \tag 2$
now any polynomial 
$f(X, Y) \in K[X, Y] \tag 3$
may be written 
$f(X, Y) = \displaystyle \sum_{i, j = 0}^{i + j \le \deg f} f_{ij}X^i Y^j, \; f_{ij} \in K, \forall i, j, \tag 4$
which may be re-arranged as follows:
$f(X, Y) = \displaystyle \sum_{i, j = 0}^{i + j \le \deg f} f_{ij}X^i Y^j =  \sum_{j = 0}^{j = \deg f} \left ( \sum_{i = 0}^{i = \deg f - j} f_{ij} X^i \right ) Y^j= \sum_{j = 0}^{\deg f} P_j(X)Y^j, \tag 5$
where
$P_j(X) = \displaystyle \sum_{i = 0}^{i = \deg f - j} f_{ij} X^i \in K[X]; \tag 6$
in this way we express $f(X, Y)$ as a polynomial in $Y$ with coefficients in the ring $K[X]$; that is, as an element of $K[X][Y]$:
$f(X, Y) \in K[X][Y]; \tag 7$
in the light of these remarks, we see that
$z = f(x, y) = \displaystyle \sum_{j = 0}^{\deg f} P_j(x)y^j \in K(x)(y) = K(x, y), \tag 8$
where
$P_j(x) = \displaystyle \sum_{i = 0}^{i = \deg f - j} f_{ij} x^i \in K(x). \tag 9$
By virtue of (8), we see that $z$ is algebraic over $K$ provided that
$[K(x)(y):K] = [K(x, y):K] < \infty; \tag{10}$
since
$[K(x):K] = n < \infty, \tag{11}$
we see that (10) will bind if
$[K(x)(y):K(x)] = [K(x, y):K(x)] < \infty, \tag{12}$
by virtue of
$[K(x)(y):K] = [K(x)(y):K(x)][K(x):K]; \tag{13}$
now by (2), we know that $y$ satisfies some polynomial
$\theta(X) \in K[X]; \; \theta(y) = 0, \tag{14}$
with 
$\deg \theta \le m; \tag{15}$
but since
$\theta(X)  \in K[X] \subset K(x)[X], \tag{16}$
it follows that
$[K(x)(y):K(x)] \le m; \tag{17}$
therefore (13) yields
$[K(x)(y):K] = [K(x)(y):K(x)][K(x):K] \le mn; \tag{18}$
now (8) and (18) act together in collusion to prove that $z$ is algebraic over $K$.
