# Let $X \subseteq Y$ are affine varieties. If $X$ is irreducible then $X$ is contained in an irreducible component of $Y$.

Let $$X \subseteq Y$$ are affine varieties. If $$X$$ is irreducible then $$X$$ is contained in an irreducible component of $$Y$$.

I came up with this statement while I was reviewing the definition of the dimension of reducible varieties.

We define the dimension of $$X$$ to be the maximum of the dimensions of the irreducible components of $$X$$. Suppose $$d=\dim(X)=\max\left\{\dim(X_i)\right\}$$ and pick $$j$$ such that $$\dim(X_j)=d$$. If there exists an irreducible variety $$Y$$ such that $$X_j \subsetneq Y \subsetneq X$$ (I'm assuming $$X$$ is reducible in this case), then $$\dim(X)=d<\dim(Y)$$ so I have a subvariety which has the dimension greater than the variety containing it. This doesn't sound right for me.

If the above statement is true, then we can avoid this problem. Can anyone tell me if the statement is true? If it's true, how do you prove it?

Hint Let $$\{ Y_i \}$$ be the irreducible components of $$Y$$.
Then $$X= \cup_i (X \cap Y_i)$$ and $$X \cap Y_i$$ is closed.
• Thanks! I also found a useful property too: If $Q$ is prime and $Q \supseteq P_1 \cap \cdots \cap P_\ell$ then $Q \supseteq P_j$ for some $j$. – Andrew Jul 25 '19 at 20:28