Computing irreducible components of a simple algebraic set. Let $X = V(x^2+y^2-z) \subseteq \mathbb{A}^3$, I'd like to compute the irreducible components of the algebraic set, and the dimension of the components. I know this is a simple example, but I'm really struggling with the concepts.
I know this corresponds to $x^2+y^2-z=0$ so it's just a paraboloid, so intuitively I assume that it's already irreducible. I know that $X$ is irreducible $\iff I(X)$ is prime, but I also know that if the ideal of an algebraic set is principal, $X$ is irreducible if and only if the generator is irreducible. Either way I need to know $I(X)$ so I just guessed that $I(X) = (x^2+y^2-z)$, the fact that $(x^2+y^2-z) \subseteq I(X)$ is obvious. But how can I show the reverse containment? If $f \in I(X)$ then all I know is that $f \in k[x,y,z]$ but that it vanishes on $X$, I don't see what that gives me.
If there's some instant justification, something along the lines of $I(X) = (f)$ whenever $X = V(f)$ let me know. Also let me know how I might justify the guess for $I(X)$, I have absolutely zero intuition for what's going on. I know the question is super basic, but I'm really struggling with the algebraic geometry material.
 A: Your guesses are correct, we have $I(X)=(x^2+y^2-z)$ and this is prime. To see this by brute force, we may regard $x^2+y^2-z$ as a polynomial in $k[x,y][z]$, which by Gauss' Lemma is irreducible if and only if it is irreducible in $k(x,y)[z]$. As polynomials of degree one over a field are irreducible, we conclude that $x^2+y^2-z$ is irreducible, and thus $(x^2+y^2-z)$ is prime. In particular, as prime ideals are radical, we also obtain
$$
I(X)=\sqrt{(x^2+y^2-z)}=(x^2+y^2-z)
$$
by the Nullstellensatz.
Note that in general, if $X=V(f)$ for some $f\in k[x_1,\ldots,x_n]$, and if $f=p_1^{e_1}\cdots p_r^{e_r}$ is the decomposition into distinct irreducible factors, then
$$
I(X)=\sqrt{(f)}=(p_1\cdots p_r).
$$
As outlined by the OP @Irving Rabin in the comments, a more nuanced approach would be the following: let $I=(x^2+y^2-z)$, then the map $\Phi:k[x,y,z]\to k[x,y]$ defined by $\Phi|_{k[x,y]}=\operatorname{id}$ and $z\mapsto x^2+y^2$ has $I$ in its kernel. Hence we obtain an induced map $\varphi:k[x,y,z]/I\to k[x,y]$. But notice that we also have a map $\psi$ in the other direction, i.e. $\psi:k[x,y]\to k[x,y,z]/I$ defined by $x\mapsto x+I$ and $y\mapsto y+I$. It is not hard to check that $\varphi$ and $\psi$ are mutually inverse to each other, and thus they are isomorphisms. In particular, we obtain that $I$ is prime, and thus $I(X)=\sqrt{I}=I$. Notice also that what is going on geometrically, is that we are just projecting $X$ down to the $x,y$-plane, which is an isomorphism as $X$ is a paraboloid sitting over the $x,y$-plane (the projection corresponds to $\psi$ above).
