Exercise 1.1.(c) in Hartshorne's Deformation Theory Exercise 1.1.(c) in Hartshorne's Deformation Theory:

Over an algebraically closed field $k$, we define a curve in $\mathbb P^2_k$ to be the closed subscheme, defined by a homogeneous polynomial $f(x,y,z)$ of degree $d$ in the coordinate ring $S=k[x,y,z]$.
(c) For any finitely generated $k$-algebra $A$, we define a family of curves of degree $d$ in $\mathbb P^2$ over $A$ to be a closed subscheme $X\subseteq\mathbb P^2_A$, flat over $A$, whose fibers above closed points of $\mathrm{Spec}\,A$ are curves in $\mathbb P^2$. Show that the ideal $I_X\subseteq A[x,y,z]$ is generated by a single homogeneous polynomial $f$ of degree $d$ in $A[x,y,z]$.

My attempts: the condition on fibers above closed points is equivalent to the condition that for any $\mathfrak m\in\mathrm{Specm}\,A$ the ideal $(I_X,\mathfrak m)/\mathfrak m$ is principal. Equivalently, for any $\mathfrak m$ there is $f_{\mathfrak m}\in I_X$ such that $I_X\subset (f_{\mathfrak m},\mathfrak m)$. Also, it is clearly sufficient to prove that $I_X$ contains a homogeneous element of degree $d$.
 A: I am just writing my comment as an answer.  The stated exercise is true locally on $\text{Spec}\ A$, however it is not true globally.  For instance, let $A$ be $k[s,t,u,v]/\langle st-uv,u+v-1\rangle$.  Let $J$ denote the ideal in $A$ generated by $s$ and $u$.  This has a presentation, $$A^{\oplus 2}\xrightarrow{M} A^{\oplus 2} \xrightarrow{q} J \to 0,$$
where $q(f,g)$ equals $fs-gu$ and where $M$ is the following $2\times 2$ matrix, $$M = \left[\begin{array}{cc}u & t \\ s & v \end{array} \right].$$  Denote by $I_{X,1}$ the image of the $A$-module homomorphism, $$\phi:A^{\oplus 2} \to A[x,y,z]_1,\ \  (f,g) \mapsto (fs-gu)x + (fv-gt)y.$$  The ideal $I_X\subset A[x,y,z]$ generated by $I_{X,1}$ is a radical homogeneous ideal whose corresponding zero scheme, $X\subset \mathbb{P}^2_A$, is flat over $\text{Spec}\ A$ of relative degree $1$.  The $A$-module $I_{X,1}$ is locally free of rank $1$, isomorphic to $J$.  Yet the ideal $I_X$ is not principal since the $A$-module $I_{X,1}\cong J$ is not free.
A: I agree. Thanks for discovering the error. And by the way there is another error on the same page, line -1, there is a -2 that should be a -4.
Robin Hartshorne
