# Connected components of a fiber product of schemes

The underlying set of the product $X \times Y$ of two schemes is by no means the set-theoretic product of the underlying sets of $X$ and $Y$.

Although I am happy with the abstract definition of fiber products of schemes, I'm not confident with some very basic questions one might ask. One I am specifically thinking about has to do with the connected components of a fiber product.

Say $X$ and $Y$ are schemes over $S$ and let's suppose that $Y$ is connected and that $X = \coprod_{i \in I} X_i$ is the decomposition of $X$ into connected components. Is the connected component decomposition of $X \times_S Y$ simply $\coprod_{i \in I} X_i \times_S Y$?

If so, how can we see this? What about if we replace "connected" with "irreducible".

"No" in both cases: let $f\in K[X]$ be a separable irreducible polynomial of degree $d>1$ over some field $K$. Let $L$ be the splitting field of $f$ over $K$. Let $X:=\mathrm{Spec} (K[X]/fK[X])$, $Y:=\mathrm{Spec}(L)$ and $S:=\mathrm{Spec}(K)$. Then $X$ is irreducible and $X\times_K Y=\mathrm{Spec}(L[X]/fL[X])$ consists of $d$ points, which are the irreducible components of $X\times_K Y$. Moreover these points are also the connected components of $X\times_K Y$.