TITLE: Showing that a ring homomorphism from a field to a ring is injective
QUESTION [7 upvotes]: A similar question like this has been asked here, apologies, but need to clarify something at the end
Our homework question was to show that any ring homomorphism $f:K\rightarrow R    $ (where K is a field, R is a ring) is injective.
So by definition of a ring homomorphism, $ker(f)$ is an ideal in K.
By K a field $\Rightarrow$ the only ideals are $\{0\}, K$
$ker(f)={0} \Rightarrow f$ is injective, by definition of an injective ring homomorphism.
However I answered saying that $ker(f)=K \Rightarrow$ f is the zero map, $f(k)=0\ \forall k\in K$. So $f$ is either injective, or it is the zero map.
To which my corrector asked, " Is the zero map a ring homomorphism?"
Obviously if you've got something like $f:\Bbb R \rightarrow \Bbb Z_4 $, then $f(1_R)=f(1)=0 \ne 1 $ so this can't be a ring homomorphism
But if you considered $f:\Bbb R \rightarrow \{0\} $ , then $f(1_R)=f(1)=0 = 1_0 $
Does this work as a ring homomorphism?
So can the zero map sometimes be a ring homomorphism?

REPLY [2 votes]: If we assume that your instructor is competent, then when he asks "is the zero map a homomorphism?", he's not necessarily claiming that it never is, but merely pointing out that your answer is incomplete until you include some discussion of the circumstances in which it is a homomorphism -- namely that it is a (unital) homomorphism exactly when the codomain is the zero ring.
Of course the homework problem is flawed when it asks you to prove something that isn't strictly true. That just means that the perfect solution will point out the flaw and find a way to repair it with complete rigor. It sounds like it may have been unclear from your solution whether you were wrong (and thought the zero map is always a solution), or you were right (and were contemplating the zero ring) but just failed to write your correct thoughts down completely.