I am introducing my self to algebraic geometry, and by now I am reading Algebraic Geometry by Robin Hartshorne. In the exercise $2.16$, I have to prove that the intersection of two varieties need not be a variety.
For that, we consider de quadrics $Q_1 \equiv x^2-yw=0$ and $Q_2 \equiv xy-zw=0$. I proved that the intersection $Q_1 \cap Q_2$ is the union of the twisted cubic curve $y^2=xz$ and the line $x=w=0$. But at this point, I don't know why this union is not a variety.
Maybe by the fact that the union is not irreducible?
Yes. That's exactly why. Your algebraic set has two irreducible components, and this is what stops it from being a variety.