# Hartshorne Exercise II. 3.19 (b)

How do we prove the following exercise of Hartshorne?

Let $A$ be a subring of an integral domain $B$. Suppose $B$ is a finitely generated $A$-algebra. Let $b$ be a non-zero element of $B$. Then there exists a non-zero element $a$ of $A$ with the following property. If $\psi\colon A \rightarrow \Omega$ is any homomorphism of $A$ to an algebraically closed field $\Omega$ such that $\psi(a) \neq 0$, then $\psi$ extends to a homomorphism $\phi\colon B \rightarrow \Omega$ such that $\phi(b) \neq 0$.

Check Proposition $5.23$ in Atiyah-Macdonald.
We use induction on the number of generators of $B$ over $A$. It suffices to to prove the assertion when $B = A[x]$. Let $K$ be the field of fractions of $A$. Suppose $x$ is not algebraic over $K$. Let $b = a_0x^n + \cdots + a_1x + a_n$, where $a_i \in A$ for $i = 0,1,\dots,n$ and $a_0 \neq 0$. Let $\psi\colon A \rightarrow \Omega$ be a homomorphism such that $\psi(a_0) \neq 0$. Let $\alpha$ be an element of $\Omega$ which is not a root of the polynomial $\psi(a_0)X^n + \cdots + \psi(a_1)X + \psi(a_n)$. There exists a unique homomorphism $\phi\colon B \rightarrow \Omega$ extending $\psi$ such that $\phi(x) = \alpha$. Then $\phi(b) \neq 0$.
It remains to prove the asssertion when $x$ is algebraic over $K$. Then $b$ is also algebraic over $K$. Suppose $a_0x^n + \cdots + a_1x + a_n = 0$, where $a_i \in A$ for $i = 0,1,\dots,n$ and $a_0 \neq 0$. Suppose $c_0b^m + \cdots + c_1b + c_m = 0$, where $c_i \in A$ for $i = 0,1,\dots,m$ and $c_0 \neq 0$ We may assume that $c_m \neq 0$. Let $a = a_0c_m$. Then $B_a = A_a[x]$ is integral over $A_a$, where $A_a$ is the localization of $A$ with respect to $\{1, a, a^2,\dots\}$. Let $\psi\colon A \rightarrow \Omega$ be a homomorphism such that $\psi(a) \neq 0$. $\psi$ is uniquely extended to a homomorphism $\psi'\colon A_a \rightarrow \Omega$. Hence by this question, $\psi'$ can be extended to a homomorphism $\phi\colon B_a \rightarrow \Omega$. We claim $\phi(b) \neq 0$. Suppose $\phi(b) = 0$. Then $\psi(c_m) = 0$. Hence $\psi(a) = 0$. This is a contradiction.