TITLE: Show that $X$ is not an affine variety
QUESTION [5 upvotes]: I need some help proving that $X=\{(x,x)~|~x \in \mathbb{R}, x \neq 1\}$ is not an affine variety. I would like to proceed by supposing it is an affine variety and then finding a contradiction. So assume $X=V(f_1,...,f_s)$. Now I want to show that if $f \in \mathbb{R}[x,y]$ vanishes on $X$ then $f$ also vanishes at the point $(1,1)$. 
I have thought about how to proceed form here for about an hour now and have not got anywhere. Please help. Thanks

REPLY [2 votes]: This actually depends on your viewpoint. For example $Y=\mathbb{R}\setminus \{0\}$ is not an affine subset (i.e. a Zariski-closed subset) of $\mathbb{R}$, but it is an affine variety, when viewed in a different way. We can define a map $V(xy-1)\rightarrow Y$ which is an isomorphism. $V(xy-1)$ of course is a Zariski-closed subset in $\mathbb{R}^2$. 
The point is, there is some nuance to the definition of affine variety. It should be a variety that can be embedded into affine space as a Zariski-closed subset.
Your variety $X$ is obviously isomorphic to $Y$ which I have just mentioned is an affine variety. It is however not an Zariski-closed subset on it's own in $\mathbb{R}^2$ which I am sure is what you wanted. For this you can use the arguments from the other posts. 
I just wanted to mention this detail to let you know there is more to the story.