homomorphism keeps the unit and commutativity? 
Let $R,S$ be a rings and let $\varphi:R\to S$ be a rings homomorphism on $S$. Prove or disprove with counter example:
A. if $R$ is a commutative ring then $S$ is commutative
B. if $R$ has a unit then $S$ has a unit.

Attempt:
A. Take $r_1,r_2\in R$ then $\varphi(r_1\cdot r_2)=\color{blue}{\varphi(r_1)\varphi(r_2)}=\varphi(r_2\cdot r_1)=\color{blue}{\varphi(r_2)\varphi(r_1)}\implies S$ commutative.
B. No, let $\varphi:\mathbb Z\to 2\mathbb Z$ there is a unit at $\mathbb Z$ but not in $2\mathbb Z$
 A: Hints:


*

*For $A$, this only works for elements in the image of $\varphi$.  What if $S$ has more elements than are images of $\varphi$?  As an example, consider the map 
$$
\mathbb{Z}\rightarrow M_{2,2}
$$
the map from the integers to $2\times 2$ matrices where $a\mapsto\begin{bmatrix}a&0\\0&a\end{bmatrix}$.

*For $B$, what is your map from $\mathbb{Z}\rightarrow 2\mathbb{Z}$?  Is it the multiplication by $2$ map?  If so $2=\varphi(1)=\varphi(1\cdot 1)=\varphi(1)\cdot\varphi(1)=2\cdot 2=4$.  So, the map is not well-defined.  What if you consider the zero map $\mathbb{Z}\rightarrow2\mathbb{Z}$?  (Or the example of @egreg in the comments above).

*As a side note to $B$, consider the map
$$
\mathbb{Z}\rightarrow\operatorname{Diag}_{2,2}
$$
the map from the integers to $2\times 2$ diagonal matrices where $a\mapsto\begin{bmatrix}a&0\\0&0\end{bmatrix}$.  In this case, both $\mathbb{Z}$ and $\operatorname{Diag}_{2,2}$ have identities, but the map does not take the identity of $\mathbb{Z}$ to the identity of $\operatorname{Diag}_{2,2}$.
