# Is the degree of a finite morphism stable by base change

Let $f:X\longrightarrow Y$ be a finite morphism of schemes of degree $n$. Let $S\to Y$ be a morphism of schemes.

Is the degree of the finite morphism $X\times_Y S \longrightarrow S$ equal to $n$?

If not, what conditions should be put on $X$ and $Y$?

If it helps, you can assume all the schemes to be integral.

-
Indeed, you'd better assume integral. Otherwise consider $X = A^1 \coprod pt$ mapping to $A^1$ degree $1$, and $S$ a point mapping to the image of $pt$. Now I just need a finite morphism of integral schemes that isn't flat... –  Allen Knutson Oct 9 '11 at 11:21
How do you map $X$ to $\mathbf{A}^1$ with degree 1? Won't one point in $\mathbf{A}^1$ have two points lying over it? For a finite morphism of integral schemes which isn't flat consider the normalization of k[x,y]/(xy), where k is a field. –  Taicho Oct 9 '11 at 11:37
How do you define the degree if you assume neither integral schemes nor $f$ flat? –  user2035 Oct 9 '11 at 12:31
i don't know...I define the degree to be the degree of the finite field extension $K(Y) \subset K(X)$ if $X$ and $Y$ are integral. I see why one requires the flatness condition now. –  Taicho Oct 9 '11 at 12:45

I shall assume that $X,Y$ are integral, locally noetherian schemes and that $f$ is dominant. Then the degree of $f$ is the degree of the corresponding extension of fields, namely $$deg(f)=[Rat(X):Rat(Y)]$$. We have for the fibers $X_y \; (y\in f(X))$ of $f$ the interesting result: $$dim_{\kappa (y)} \mathcal O(X_y)\geq deg(f)$$ with equality for all fibers $$dim_{\kappa (y)} \mathcal O(X_y)= deg(f) \quad (\star)$$

if and only if $f$ is flat (cf. Qing Liu's book, page176).
So non flat morphisms will give you counterexamples by taking for $S$ a point of $Y$.
For an explicit counterexample, consider the case where $Y$ is a node, $X$ the affine line (both over a field $k$) and $f$ the normalization morphism. This is a finite morphism of degree one, but the fiber of the singular point has degree $2$ over $k$.
More generally, normalizations of non-normal varieties are never flat and will yield any number of countereamples.

Also if $f$ is flat the criterion will tell you, since flatness is preserved under base-change, that the degree of $f$ will be preserved under some reasonable assumptions on the morphism $S\to Y$, the most obvious one being that $S$ should be locally noetherian and integral too.

A well-known formula Here is an arithmetically flavoured illustration of the above.
Let A be a Dedekind domain with fraction field $K$ and $L$ a separable field extension of $K$ of degree $[L:K]=n$. Let $B$ be the ring of elements in $L$ integral over $A$.
That ring $B$ is flat over $A$ (because for Dedekind rings flat=without torsion) and is a Dedekind domain, finite over $A$ (Krull-Akizuki).
We can apply the considerations above above to the associated morphism $f:Spec(B)=X\to Y=Spec(A)$.
Take a nonzero prime $\mathfrak p =y \in Y$ and write ${\mathfrak p}B=\prod {\mathfrak P}_i^{e_i}$.
Since $X_y=Spec(B/{\mathfrak p}B)$, the formula $(\star )$ translates into the very classical formula of algebraic number theory (where $f_i=[B/{\mathfrak P}_i: A/ \mathfrak p]$): $$n=\sum e_if_i$$

-
The flatness condition is fulfilled in my situation so I'm happy. Thnx alot! –  Taicho Oct 9 '11 at 13:13