TITLE: An open subset of an irreducible set is dense.
QUESTION [18 upvotes]: I'm trying to understand this example in Hartshorne's algebraic geometry book

In order to prove the irreducible part, suppose $Y$ is an irreducible space and $Y'$ a open subset of $Y$ with $Y'=Y'_1\cup Y'_2$ with $Y'_1,Y'_2$ proper closed subsets. Then $Y=(Y-Y')\cup (Y'_1\cup Y'_2)$ contradiction because $Y$ is irreducible.
Am I right? I need help also in the density part, I'm really stuck I don't know even how to begin.
Thanks a lot.

REPLY [6 votes]: For a slightly different proof not using the density, consider that if an open subset $U \subset Y$ is reducible we can write $U = (U \setminus V) \cup (U \setminus W)$ for $V, W$ open non-empty subsets of $U$. Since $U$ is itself open, $V$ and $W$ will also be open subsets of $Y$. Hence we can write $Y = (Y \setminus V) \cup (Y \setminus W)$, so $Y$ is reducible.