In exercise 1.8 of chap I in Hartshorne algebraic geometry,
Let $Y$ be an affine variety of dimension $r$ in $\mathbf A^n$. Let $H$ be a hypersurface in $\mathbf A^n$, and assume that $Y \nsubseteq H$. Then every irreducible component of $Y \cap H$ has dimension $r-1$.
Let $I(H)={f}$. I saw a solution in which one of the steps was to prove that $\bar{f}$ is not a unit in $A/I(Y)$. How to prove this ?