Ideal of polynomials vanishing on $\{(x,y): x^2+y^2=1, x \neq 0 \}$ I'm reading the book "Introduction to algebraic geometry" by Hassett, and in Chapter 3, after introducing the concept of the ideal of polynomials vanishing on a set $S$, the author gives some examples, including this one:

In $\mathbb{A}^2(\mathbb{R})$,
  $$I(\{(x,y): x^2+y^2=1, x \neq 0 \})=\langle x^2+y^2-1\rangle$$

One inclusion is obvious, but why does a polynomial in the set of the left must belong to the set in the right? Thank you in advance!
 A: A polynomial $f\in \mathbb{R}[x,y]$, considered as a function $f:\mathbb{R}^2\to\mathbb{R}$, is continuous (where $\mathbb{R}^2$ and $\mathbb{R}^2$ are given their usual topologies). Therefore if $f\in I(\{(x,y): x^2+y^2=1, x \neq 0 \})$, we have
$$f(0,1)=\lim_{t\to \pi/2}f(\cos(t),\sin(t))=\lim_{t\to 0}0=0\\
f(0,-1)=\lim_{t\to 3\pi/2}f(\cos(t),\sin(t))=\lim_{t\to 0}0=0$$
Therefore, we have
$$I(\{(x,y): x^2+y^2=1, x \neq 0 \})=I(S^1)=I(V(x^2+y^2-1))=\operatorname{rad}(x^2+y^2-1).$$
So it remains to show that $\operatorname{rad}(x^2+y^2-1)=(x^2+y^2-1)$. Viewing $x^2+y^2-1$ as an element of $D[y]$ where $D=\mathbb{R}[x]$, we see
$$1\cdot y^2+0\cdot y+(x^2-1)\cdot 1\in D[y]$$
is Eisenstein at the prime ideal $(x-1)\subset D$ (Wikipedia link), and thus is irreducible. Since $D[y]=\mathbb{R}[x,y]$ is a UFD, an ideal generated by an irreducible element is a prime ideal, hence a radical ideal.
A: Write $f(x,y)=(x^2+y^2-1)g(x,y)+a(x)y+b(x)$ with $a(x), b(x)\in\mathbb R[x]$. Since $f(x_0,y_0)=0$ for all pairs $(x_0,y_0)$ such that $x_0^2+y_0^2=1$, $x_0\ne0$ it follows $a(x_0)y_0+b(x_0)=0$ for all pairs $(x_0,y_0)$ such that $x_0^2+y_0^2=1$, $x_0\ne0$. In particular, $a(\sin t)\cos t+b(\sin t)=0$ for $t\ne k\pi$, so $a^2(\sin t)(1-\sin^2 t)=b^2(\sin t)$ for $t\ne k\pi$. It follows $a^2(x)(1-x^2)=b^2(x)$, and this leads easily to $a(x)=b(x)=0$. (We have $1\pm x\mid b^2(x)$, so $1\pm x\mid b(x)$. Then $b(x)=(1-x^2)b_1(x)$, and plugging this into $a^2(x)(1-x^2)=b^2(x)$ we get $a^2(x)=(1-x^2)b_1^2(x)$. Now repeat the reasoning for $a(x)$, and so on.)
