Let $X$ and $Y$ be schemes over a field $k$, and let $\phi :X \to Y$ be a morphism of schemes.
- What is the most general situation where one can define the degree of $f$? Is $X$ and $Y$ being geometrically integral enough?
- How is the degree of $f$ affected by base change?
The most general definition I can think of is a finite locally free morphism, that is, a morphism of schemes $f\colon X \to Y$ such that:
In this case, $Y$ can be written as a disjoint union of open and closed subschemes on which the rank/degree is constant. So in particular, if $Y$ is connected, then the degree of $f$ is a constant.
To understand how this behaves under base change, we can pass to an affine open patch as above, so the situation is that $A \subseteq B$ is an extension of rings such that $B \cong \bigoplus_{i=1}^r A$ as an $A$-module, and $C$ is an $A$-algebra. Then $$B \otimes_A C \cong \Bigl( \bigoplus_{i=1}^r A \Bigr) \otimes_A C \cong \bigoplus_{i=1}^r (A \otimes_A C) \cong \bigoplus_{i=1}^r C.$$ Thus, $B \otimes_A C$ is a free $C$-module of rank $r$. (Note also that the base change of an affine morphism is affine.) This shows degree is invariant under base change.
A couple caveats: