TITLE: Endomorphisms of a maximal ideal of a local ring
QUESTION [8 upvotes]: Let $R$ be a commutative local  ring with maximal ideal $\mathfrak{m}$. Is it true in general that $\text{Hom}_R(\mathfrak{m},\mathfrak{m})\cong \text{Hom}_R(\mathfrak{m}, R)$? What if the Krull dimension of $R$ is equal to one?

REPLY [10 votes]: Yes, this is always true.
Let us assume $\text{Hom}_R(\mathfrak m,\mathfrak m)\neq\text{Hom}_R(\mathfrak m,R)$, so we have a homomorphism $f:\mathfrak m\rightarrow R$ with image not contained in $\mathfrak m$: say $f(x)\in R^\times$ for some $x\in\mathfrak m$. We can w.l.o.g. assume that $f(x)=1$ (since $f(x/f(x))=1$). Now, we must have $y=yf(x)=f(xy)=xf(y)$ for all $y\in\mathfrak m$. Hence, $\mathfrak m$ is generated by $x$ and multiplication by $x$ is injective (since $xy\neq0$ for $0\neq y\in\mathfrak m$ follows from this equation and obviously $xy\neq0$ for $y\in R^\times$). But then we have $\mathfrak m\cong R$ as $R$-modules.