# Only proper ideal is $\{0\}$ $\implies f:A \rightarrow B$ is injective

I'm thinking about the proof of the following:

If $A,B$ are rings and the only proper ideal of $A$ is $\{0\}$ and $f:A \rightarrow B$ is a ring homomorphism then $f$ is injective.

My proof:

Assume $\ker f \neq 0$. $\ker f$ is an ideal of $A$ therefore $\ker f = A$ therefore $f = 0$. But this is not a ring homomorphism because $f(1) \neq 1$. Therefore $\ker f$ must be $0$ and $f$ is injective.

My question is this: does the fact I'm proving only hold for rings with unity? Or is there a proof that doesn't use $f(1) = 1$ to prove the same thing? Many thanks for your help.

-
In rings without a unit, the zero map into any ring is a homomorphism (just check the definition of homomorphism), so clearly you don't want to prove quite the same thing. But the same proof shows that any such $f$ is either 0 or injective. – Alex B. Oct 4 '11 at 8:40

Your proof is correct if $B$ is not the zero-ring, which has only one element 0=1. Also note that a ring, that has $\{0\}$ as its only proper ideal must be a division ring: if $0 \neq a \in R$ is non-invertible, then the ideal generated by $a$ is a proper ideal that is different from $\{0\}$. In the commutative case you have now proved that a field homomorphism is always injective.
If the only proper ideal of ring $A$ is $0$, then this implies for every $0\neq a\in A$, the ideal (a)=A, hence $\exists b\in A$ such that $ab=1$,i.e. $a$ is invertible. Hence $A$ is a field.