It's always good to have a stock of non-examples.
§ Line with hole: Algebraic proof
The set of points is not a variety. To prove this, assume it is a variety defined by equations . Let . Since vanishes on , we must have for all (since for all ). So create a new function . Now . This polynomial (it is a composition of polynomial, and is thus a polynomial) has infinitely many zeroes, and is thus identically zero. So, , So for all . In particular, for all equations that define , hence . But this does not give us the variety . Hence is not a variety.
§ Line with hole: Analytic proof
The set of points is not a variety. To prove this, assume it is a variety defined by equations . Let . Since vanishes on , we must have for all (since for all ). Since is continuous, preserves limits. Thus, . The left hand side is zero, hence the right hand size must be zero. Thus, . But this can't be, because .
§
The set is not an algebraic variety. Suppose it is, and is the zero set of a collection of polynomials . Then for some , they must vanish on at least all of , and maybe more. This means that for all . But a degree polynomial can have at most roots, unless it is the zero polynomial. Since does not have a finite number of roots, . Thus, all the polynomials are identically zero, and so their zero set is not ; it is all of .
§ The general story
In general, we are using a combinatorial fact that a degree polynomial has at most roots. In some cases, we could have used analytic facts about continuity of polynomials, but it suffices to simply use combiantorial data which I find interesting.