Irreducible conics An algebraic set (not necessairly a variety) $X \subseteq \mathbb{A}^2$ defined by a polynomial of degree $2$ is called a conic.
The problem is:

Show that any irreducible conic is isomorphic either to $Z(y-x^2)$ or to $Z(xy-1)$ after an affine change of coordinates in $\mathbb{A}^2$.

However, with this definition of conic, I only can conclude that if the polynomial is irreducible, then the conic is irreducible (because $f$ irreducible $\Rightarrow Z(f)=X$ is irreducible)

What can I do to prove that if a conic is irreducible, then the polynomial that defines the conic is irreducible?

And for the main problem, how can I do the affine change of coordinates?
Thanks
 A: Dragos Oprea's solution from problem 3 on 
solution set 2 to the course Fall 2012: Algebraic Geometry (Math 203A) at UC San Diego:
Let $F(x,y)=ax^2+by^2+cxy+dx+ey+f$.
We will show that after a linear/affine change of coordinates the conic can be written as
$XY − 1 = 0$ or $Y − X^2 = 0$. We discuss the following cases.
Case1. If $a=b=0$, then
$F(x,y)=cxy+dx+ey+f =c(xy+ \frac{d}{c}x+ \frac{e}{c}y) +f =c(x+ \frac{e}{c})(y+ \frac{d}{c}) +\tilde{f}$
If $\tilde{f} = 0$, $F$ is reducible, which is not allowed. Therefore $\tilde{f}\neq 0$.
Let $X=−\frac{c}{\tilde{f}} (x+\frac{e}{c})$ and $Y =y+\frac{d}{c}$, so that $F =−\tilde{f}XY +\tilde{f}$.
Thus $F (x, y) = 0$ implies $XY−1=0$.
After an affine change of coordinates, the conic $Z(F)$ becomes $XY−1=0$.
Case 2. If either $a$ or $b$ is not $0$, without loss of generality, we may assume $a \neq 0$. Then, $F=ax^2 +by^2 +cxy+dx+ey+f=a(x+\frac{c}{2a}y)^2 +\tilde{b}y^2 +dx+ey+f$ Let $x_1=\sqrt{a}(x+ \frac{c}{2a}y)$ and $y_1=y$, (choose any one of the square roots). There exist constants $\tilde{d}$, $\tilde{e}$, $\tilde{f}$ such that 
$F=x_1^2+by_1^2+\tilde{d}x_1+\tilde{e}y_1+\tilde{f}= (x_1+\frac{\tilde{d}}{2})^2+by_1^2+\tilde{e} y_1+\tilde{\tilde{f}}$.
￼Let $x_2 = x_1 + \frac{\tilde{d}}{2}$.
Subcase (i): If $b = 0$, $F = x_2^2 +\tilde{e} y_1 + \tilde{\tilde{f}}$.
We claim $\tilde{e}\neq 0$ because otherwise $F =(x_2 +i \sqrt{\tilde{\tilde{f}}})(x_2 −i \sqrt{\tilde{\tilde{f}}})$ is reducible. Let $X=x_2$, $Y =−(\tilde{e}y_1+\tilde{\tilde{f}})$. Then $F = X^2 − Y$.
Subcase (ii): If $b\neq 0$, let $y_2=\sqrt{b}y_1+\frac{\tilde{e}}{2\sqrt{b}}$ so that $F = x^2 + y^2 + g$. Letting $X=\sqrt{−g}(x_2+iy_2)$ and $Y=\sqrt{−g}(x_2−iy_2)$, we have $F = −g(XY − 1)$.
Therefore, the conic $Z(F)$ can be written in the form $XY −1=0$ after an affine change of coordinates.
A: To the last question: Saying "the" polynomial might be a little misleading, since $Z(f) = Z(f^2)$ and so on. But actually this is the only thing that can go wrong: if you write down a prime factorization $f = p_1^{m_1} \cdots p_r^{m_r}$ then $Z(f) = Z(p_1) \cup \cdots \cup Z(p_r)$ is the decomposition of $Z(f)$ into irreducible components. Check this! So if a hypersurface like this is irreducible then it really is the zero set of an irreducible polynomial. [It's harder to show that a subvariety of $\mathbb{A}^n$ of dimension $n - 1$ must be of this form; see (1.13) of Hartshorne.]
But this brings up an issue: under your definition it seems that $Z(x^2)$ is an irreducible conic, and that's probably not something you want.
Regarding the problem overall: It's somehow less scary than it looks. It's very common to suggest moving to $\mathbb{P}^2$ and working with quadratic forms but one can just charge ahead and complete the square wherever possible. If I can think of a more intermediate hint I'll update this post, but do try it.
