Let $X$ be an affine variety.
Definition: Let $X$ be an irreducible affine variety and $C(X)$ its field of rational functions. Then the dimension of $X$ is defined by $$ \mathrm{dim} X := \mathrm{tdeg}_\mathbb{C} C(X) $$ where $\mathrm{tdeg}$ denotes the transcendence degree of the field extension $C(X)/ \mathbb{C}$. If $X$ is reducible and $X=\cup X_i$ its irreducible decomposition then $$ \mathrm{dim} X := \max \mathrm{dim} X_i . $$
I'm trying to prove the following:
Let $U ⊆ X$ be a dense open set. Then $\mathrm{dim} X\setminus U < \mathrm{dim} X$.
If $X$ is irreducible, I know how to show that the inequality holds. But I can't use the same argument if I don't have that each irreducible component of $X\setminus U$ is in some $X_i$. Anyone know if is it true? Any hints?
Can anyone help me?
Write $X = \cup_i X_i$ where $X_i$ are the irreducible components. Assuming $X$ is noetherian, there are finitely many irreducible components. Thus $V_i = X_i \setminus (\cup_{j\neq i} X_j)$ is an open subset, and if $U$ is dense, it must meet each $V_i$. But then $U\cap V_i$ is a nonempty open subset of $V_i$, so it is dense (or, equivalently, $X_i \cap (X\setminus U)$ is a proper closed subset of $X_i$) and you may apply the statement for irreducibles to finish the proof.