By definition (in the book that I am following), an affine variety is zero set of a collection of finitely many polynomials.
Question is to prove that $\mathbb{A}^1\setminus\{0\}$ is an affine variety.
For that I need to prove that $\mathbb{A}^1\setminus\{0\}$ is zero set of (finitely many) polynomial(s).
I was having this misconception that I have to prove that $\mathbb{A}^1\setminus\{0\}$ is zero set of polynomial in one variable as we are in $\mathbb{A}^1$.
Then I read the definition again and it says:
$X\subset k^n$ is an affine variety if it is zero set of polynomials in $n$ variables.
As $\mathbb{A}^1\setminus\{0\}$ and $\{(x,y)\in k^2:xy=1\}$ are homeomorphic and $\{(x,y)\in k^2:xy=1\}$ being zero set of polynomial $f(x,y)=xy-1$, is an affine variety and so $\mathbb{A}^1\setminus \{0\}$ should also be an affine variety though not as subvariety of $\mathbb{A}^1$.
Is this justification sufficient enough to say that $\mathbb{A}^1\setminus\{0\}$ is an affine variety or am I missing something?