# What is the difference between algebraic sets and algebraic varieties?

I am wondering what is the difference between algebraic sets and algebraic varieties in complex projective space.

It seems that both are zero sets of polynomials, so what is the difference?

If we give $\mathbb A^n$ (resp. $\mathbb P^n$) their Zariski topology, an algebraic set is just a closed subset $V\subset \mathbb A^n$ (resp. $V\subset \mathbb P^n$).
Every algebraic set, which a priori is a topological subspace, can be endowed with the structure of algebraic variety: the supplementary datum consists of decreeing which functions on open subsets $U\subset V$ are considered acceptable, thus obtaining the ring $\mathcal O_V(U)$ of "regular" functions on $U$.
However there are many algebraic varieties which are neither affine nor projective, and thus are completely different from algebraic subsets: the simplest example is the plane with the origin removed, $V=\mathbb A^2\setminus \{(0,0)\}$.