This is an exercise from An Invitation to Algebraic Geometry by Karen Smith. It asks to show that the set of unitary matrices $U_n$ is not an affine algebraic variety in complex space $C^{n^2}$. However it is a real algebraic variety.
The second part is pretty easy. I expanded the complex variables into $a+bi$ and make them two real variables. Using the equations $\Sigma_j^{n} x_{ij} \bar{x_{jk}}=1$ when $i=k$ and $\Sigma_j^{n} x_{ij} \bar{x_{jk}}=0$ when $i\neq k$, I got a bunch of polynomials in terms of the $2n^2$ variables. So the zero set must be an affine algebraic variety in reals.
For the first part, I think it has something to do with the fact that $f(z)=\bar{z}$ is not analytic. But how to show that the zero set cannot come from polynomials? Thanks for any help!