Let $(X,\mathcal O_X)$ be an algebraic prevariety, by definition, it is an algebraic variety iff the diagonal $\Delta(X)$ is closed in the product $X\times X$.
The above property is equivalent to the Hausdorff separation axiom, so $(X,\mathcal O_X)$ is a variety iff $X$ is Hausdorff. But there is a problem because $\mathbb A^n_k$ with Zariski topology is not Hausdorff, so every prevariety immersed in $\mathbb A^n_k$ cannot be a variety.
Certainly this reasoning is wrong, but I can't find the mistake.
thanks for help.