Let $A,B$ be two local rings and put $\mathfrak{m}\_A, \mathfrak{m}\_B$ their maximal ideals. Now suppose that we have an injection $0 \to A \to B$ and put $\mathfrak{n} := A \cap \mathfrak{m}\_B $. It seems to me quite obvious that it should be $\mathfrak{m}\_A = \mathfrak{n}$ (at least in the geometric way of thinking local rings). The question is if someone knows an example in which $\mathfrak{m}\_A \supset \mathfrak{n}$ and $\mathfrak{m}\_A \neq \mathfrak{n}$ or a proof of the equality which goes well in this general algebraic setting without refering to geometry; I found this problem in solving Liu's exercise in Algebraic Geometry and there all goes well thanks to the geometric assumptions that these rings are local rings of ringed topological space and that the ring $A$ is the universal quotient of $B$ by a $G$-action. Then I try to generalize this part of the proof but I lost myself.


Thank you



maximal ideal in local subrings
Daniel Litt is exactly right, it is not necessary in general.


However, in the setting of algebraic geometry you are fine. Suppose now that $A$ and $B$ are obtained by localizing finitely generated $k$-algebras at a maximal ideal. Then $B/{\mathfrak{m}}\_B$ is a finite extension field of $k$ (if $k$ is algebraically closed, it is equal to $k$).


Now then, $A/\mathfrak{n} \to B/{\mathfrak{m}\_B}$ is also an extension of rings and the left hand-side is also a domain. But $k \subseteq A/\mathfrak{n} \subseteq B/{\mathfrak{m}\_B}$ so $A/\mathfrak{n}$ if a finite extension of $k$. So $A/\mathfrak{n}$ is a field. So $\mathfrak{n}$ is maximal. 


I remember Sandor pointing this out to me in a first-year algebra course.


PS: At first I thought that the ring map $A \to B$ being finite type maps might be enough, but Daniel Litt's example also shoots that down.


