Let $X,Y \subset \mathbb{A}^n$ be two irreducible affine varieties with nonempty intersection. Prove that dim$X \cap Y \geq$dim$X+$dim$Y-n$
There is a hint to use the diagonal $\Delta=\{(x,x)|x \in \mathbb{A}^n\} \subset \mathbb{A}^n \times \mathbb{A}^n$, but I don't see how this works.
Any help is appreciated!