Examples of integral ring extensions that $\operatorname{ht}P \lt \operatorname{ht}P\cap A$ $\DeclareMathOperator\ht{ht}$All rings are commutative Noetherian with identity.
Exercise 9.8 of Matsumura's book Commutative ring theory: Let $A$ be a ring and $A\subset B$ an integral extension. If $P$ is a prime ideal of $B $ with $\mathfrak p = P\cap A$ then $\ht P \leq \ht \mathfrak p$.
There are many examples that equality occurs; i.e. $\ht P = \ht \mathfrak p$. But the issue is different for the case of examples for which $\ht P \lt \ht \mathfrak p$. Can you give such examples, please?
Thank you.
 A: Take $A=\mathbb{Z}$ and $B=\mathbb{Z}[X]/(X^2+X,2X)$ $=$ $A[x]$, where $x$ denotes the residue class of $X$. Clearly, $x$ is integral over $A$. Every prime ideal of $B$ either contains $x$ or both $x+1$ and $2$. Hence $P$ = $(2,x+1)$ is a minimal prime ideal, so of height $0$. (Note that $P$ is also a maximal ideal of $B$). Since $2$ $\in$ $P$, it follows that $P\cap A$ $=$ $2\mathbb{Z}$, which is of height $1$.
A: An example of an integral ring map is a closed immersion $A \twoheadrightarrow A/I$. These usually don't satisfy $\operatorname{ht} P = \operatorname{ht} \mathfrak p$, for instance if $A$ is a finite-dimensional domain and $I$ is not the zero ideal, then any prime $P$ gives a counterexample.
These are not injective, but you can turn the map $A \to A/I$ into an injection by throwing in an extra factor: $A \hookrightarrow A \times A/I$. For instance, the example in Matthé van der Lee's answer is isomorphic to $\mathbf Z \hookrightarrow \mathbf Z \times \mathbf Z/2\mathbf Z$ (use the Chinese remainder theorem with the ideals $(x+1,2)$ and $(x)$).
A: As a complement to the minimal example of Matthé van der Lee, that is, an example for which
$$1 = \operatorname{height}(\mathfrak{p}) > \operatorname{height}(P) = 0,$$
it is easy to check that Nagata's example $A$ of a $2$-dimensional Noetherian local domain, which is not universally catenary, provides us with an integral extension $A \subsetneq B$ of integral domains and a maximal ideal $P$ of $B$ such that $$2 = \operatorname{height}(\mathfrak{p}) > \operatorname{height}(P) = 1$$
where $\mathfrak{p} = P \cap A$ is the maximal ideal of $A$.
Using the notation of the Stacks Project's presentation, we set $P := \mathfrak{m}B = xB$ so that $\mathfrak{p} = \mathfrak{m}\mathfrak{n} B = x(x - 1, z_1, z_2 \dots)B$, where

*

*we have fixed a field $k$ and a formal power series $a_1x + a_2 x^2 + \dots =: z \in k[[x]]$ which is transcendental over $k(x)$,

*we have defined formal power series $z_i \in k[[x]]$ by $xz_1 = z$ and $x z_{i + 1} + a_i = z_i \,(i \ge 1)$,

*we have set $R := k[x, z_1, z_2,\dots] \subset k[[x]]$, $\mathfrak{m} = xR$, $\mathfrak{n} = (x - 1, z_1, z_2, \dots)R$, $S := R \setminus (\mathfrak{m} \cup \mathfrak{n})$,

*$B := R_S$ and $A := k + \mathfrak{m} \mathfrak{n}B \subset B$.

Note that $B = A[x]$ with $x^2 - x - a = 0$ where $a = x(x - 1) \in A$ so that $B$ is $2$-generated as an $A$-module.
