Ring homomorphism $\mathbb{Z}/8\mathbb{Z} \to \mathbb{Z}/5\mathbb{Z}$ implies $1=0$ Let $f$ be an ring homomorphism from $R_1$  to $R_2$ and define $f^*$ as the homomorphism from the group of units of $R_1$ to the group of units of $R_2$. Suppose $f^*$ is surjective, the question is to decide if this implies that $f$ is surjective.
After several attempts I got to this example. Take $R_1 =\mathbb{Z}/8\mathbb{Z}$ (so integers mod 8), $R_2 = \mathbb{Z}/5\mathbb{Z}$, and define $f(x) = x \mod 5$ for every $x \in Z/8Z$. 
Now I noticed something weird:
$$1 = f(1) = f(5\cdot 5 \mod 8) = f(5)\cdot f(5) = (5 \mod 5)\cdot (5 \mod 5) = 0\cdot 0 = 0$$
What is wrong with my map? I don't get it, everything seems to be correct. I've checked whether $f$ is a ring homomorphism and it is (altough I'm not so sure anymore). I can't think of other mistake, but there has to be one of course.
 A: Your problems begin here:

$f(x) = x \mod 5$

If $x$ is an integer, we could understand what you mean by this. But $x$ isn't an integer here: it's an element of $\mathbf{Z} / 8 \mathbf{Z}$. What could "$x \mod 5$" mean for an integer modulo $8$?
Now, what you were probably trying to do is use the fact that every homomorphism $R/I \to S$ can be (uniquely) specified by giving a homomorphism $f : R \to S$ with the property that $f(i) = 0$ for all $i \in I$.
So, $f(x) = x \mod 5$ would make sense... if $f(x) = 0$ for all $x \in 8 \mathbf{Z}$. But, alas, $f(x) = 0$ is not true for all $x \in 8 \mathbf{Z}$.
A: The map that you have defined isn't even a homomorphism. In fact, if $m, n$ are coprime, then the only homomorphism between $\mathbb Z/n\mathbb Z$ and $\mathbb Z/m\mathbb Z$ is the trivial one, sending everything to 0: $f(x) = 0$.
A: Notice that if $\mathcal{O}^{(*)}(a) < \infty$ then there is an homomorphism $f: \langle a\rangle \to G$ such that $f(a) = b$ if, and only if, $\mathcal{O}(b)$ divides $\mathcal {O}(a)$.
$(*)$ here $\mathcal{O}(a)$ means the order of the element $a$. 
So if $G = \mathbb{Z}/5\mathbb{Z} = \langle \overline{1}\rangle$ and $\mathcal{G} = \mathbb{Z}/8\mathbb{Z} = \{\overline{1},\overline{2},\ldots,\overline{7}\}$ the only element $b$ in $\mathcal{G}$  whose order divides $\mathcal{O}(a) = 5$ is $\overline{0}$ which means that  
$$\begin{align}f: \mathbb{Z}/5\mathbb{Z} &\to \mathbb{Z}/8\mathbb{Z}\\\overline{n} &\mapsto \overline{0}\end{align} $$
and the trivial homomorphism is the only homomorphism. 
A: A little more simply: if $f(x)=x$ were an additive function, then $0+5\Bbb Z= f(0+8\Bbb Z)=f(5+8\Bbb Z)+f(3+8\Bbb Z)=5+5\Bbb Z + 3+5\Bbb Z=3+5\Bbb Z$.
Since this says that $0+8\Bbb Z$ has two distinct images under the proposed mapping, we have a contradiction with the well-definedness of the "function." So, it can't be a function at all, much less a homomorphism.
A: $f(x) = x$ is not even well-defined function, least homomorphism, if we interpret it in suitable sense $f([x]) = [x]$ since $[1] = [9]$ in $\mathbb Z/8\mathbb Z$ and we have $f([1]) = [1]$, $f([9]) = [9]$, but $[1]\neq [9]$ in $\mathbb Z/5\mathbb Z$. When dealing with quotient sets, always remember to check if your wanna-be function (relation, to be precise) is independent of choice of representatives. That's why homomorphism and isomorphism theorems are so valuable in algebra.
A: Suppose $\def\Z{\mathbb{Z}}f\colon\Z/8\Z\to\Z/5\Z$ is a ring homomorphism.
Then $f\circ \pi\colon \Z\to \Z/5\Z$ is a ring homomorphism, where $\pi\colon\Z\to\Z/8\Z$ is the canonical projection. But there's only one homomorphism of unital rings $\Z\to \Z/5\Z$ and its kernel is $5\mathbb{Z}$. Thus $\ker(f\circ\pi)\supseteq(8\Z+5\Z)=\Z$. A contradiction.
If you don't require ring homomorphisms are unital, the map $g=f\circ\pi$ is still determined by the image of $1$. Then $g(5)=5g(1)=0$, so again $\ker g\supseteq 5\mathbb{Z}$. The fact that $\ker g\supseteq 8\Z$ is obvious by definition.
