The coordinate axes are not regularly imbedded in $\mathbb{A}_k^3$ Exercise 12.1.F of Ravi Vakil's notes asks to prove that the scheme, $X$, which is the union of the coordinate axes in $\mathbb{A}_k^3$ is not regularly imbedded in $\mathbb{A}_k^3$.  The first part of the exercise asks to prove that the ideal cutting out X, $$I:=(xy, yz, xz),$$ is not generated by fewer than 3 elements. Let's assume we've already proved that. How then do we proceed?  It is clear that $I$ itself is not generated by a regular sequence, else, by the first part of the exercise, such a sequence has length at least 3, and so the irreducible components of $I$ (which are lines) would have dimension zero.  But in the notes, regularity is defined locally: $\pi: X\rightarrow Y$ is a regular imbedding if, for every $p\in X$,  the kernel of $\mathscr{O}_{Y,\pi(p)}\to\mathscr{O}_{X,p}$ is generated by a regular sequence.  Now I do know that if $\pi$ is regular at $p$, then there exists an affine neighborhood $\operatorname{spec} B$ of $\pi(p)$ with $\pi^{-1}(\operatorname{spec} B) = \operatorname{spec} A$ such that the kernel of $B\to A$ is generated by a regular sequence.  But I don't know whether if $Y$ ($= \operatorname{spec} k[x,y,z]$) is affine, that I can "glue" all those regular sequences together to get a regular sequence for $I$.
 A: I think you're getting ahead of yourself with the comments on gluing: in general, it may not be the case that a regular immersion of affine schemes must be globally cut out by a regular sequence (indeed, for codimension-one regular immersions, this is exactly saying that there are effective Cartier divisors which are not the divisor of a rational function). Instead, in this case it's better to find a point so that that the kernel of $\mathcal{O}_{Y,\pi(p)}\to\mathcal{O}_{X,p}$ is not generated by a regular sequence. Since the origin is the only singular point, it would make sense to look there, where the map $\mathcal{O}_{Y,\pi(p)}\to\mathcal{O}_{X,p}$ is given by $k[x,y,z]_{(x,y,z)}\to (k[x,y,z]/I)_{(x,y,z)}$, where the kernel is $I_{(x,y,z)}$.
But $I_{(x,y,z)}$ cannot be generated by two elements for the same reason that $I$ cannot be generated by two elements. To avoid potentially spoiling the first part of the problem, I'll put the explanation under some spoiler text:

 If $I_{(x,y,z)}$ could be generated by two elements, then $\dim I_{(x,y,z)}/(x,y,z)_{(x,y,z)}I_{(x,y,z)}\leq 2$. But $I_{(x,y,z)}/(x,y,z)_{(x,y,z)}I_{(x,y,z)}$ is exactly $(I/(x,y,z)I)_{(x,y,z)}$ since localization is exact, and because every element of $k[x,y,z]\setminus (x,y,z)$ already acts invertibly on $I/(x,y,z)I$, we have that $I_{(x,y,z)}/(x,y,z)_{(x,y,z)}I_{(x,y,z)}\cong I/(x,y,z)I$, and the dimension of $I/(x,y,z)I$ can be seen to be three by looking at the classes $xy$, $xz$, and $yz$ and noticing that they're $k$-linearly independent.

