Question :
Construct a non trivial homomorphism from the group $\mathbb Z_{14}$ to the group $\mathbb Z_{21}$.
Discussion :
So, to start off, we see that the orders of the given groups for the homomorphism, are :
$$|\mathbb Z_{14}|=14$$
$$|\mathbb Z_{21}|=21$$
Then, if $φ : \mathbb Z_{14} \to \mathbb Z_{21}$ is a homomorphism, $|φ[\mathbb Z_{14}]|$ should divide both $|\mathbb Z_{14}|$ and $|\mathbb Z_{21}|=21$. The common divisors of $14$ and $21$ are $1$ and $7$ which means that there exists a non-trivial homomorphism.
Would this also mean that $|φ[\mathbb Z_{14}]| = 7$ ?
How would one proceed after the initial criteria elaborated, to construct a homomorphism as asked though and give a complete answer to the question ? I can't seem to determine a specific one. I know that $\mathbb Z_{14}$ is the group of integers $\mod 14$ and $\mathbb Z_{21}$ is the group of integers $\mod 21$.
By the Chinese remainder Theorem, $\Bbb Z_{14}\cong\Bbb Z_7\oplus \Bbb Z_2$. Concretely, this map is given by mapping any element $a+14\Bbb Z\in\Bbb Z_{14}$ to $(a+7\Bbb Z, a+2\Bbb Z)$. Similarly, there is an isomorphism $\Bbb Z_7\oplus \Bbb Z_3\cong\Bbb Z_{21}$. This map is given by mapping $(a+7\Bbb Z,b+3\Bbb Z)$ to $(15a-14b)+21\Bbb Z$.
We want to use the homomorphism $\Bbb Z_{14}\to\Bbb Z_{21}$ induced by the homomorphism \begin{align*} \Bbb Z_7 \oplus \Bbb Z_2 &\longrightarrow \Bbb Z_7 \oplus \Bbb Z_3 \\ (x,y) &\longmapsto (x,0) \end{align*} which is nontrivial. According to the above concrete description of both CRT isomorphisms, we can describe it as follows: \begin{align*} f: \Bbb Z_{14} &\longrightarrow \Bbb Z_{21} \\ a+14\Bbb Z &\longmapsto 15a+21\Bbb Z \end{align*} This one is nontrivial. You can also check directly that it is a homomorphism.
Edit. To elaborate further on the concrete descriptions of these isomorphisms, let us discuss this slightly more abstractly. Let $p$ and $q$ be prime numbers and $n:=pq$. In our case, we have $p=7$ and $q$ is either $2$ or $3$. The Extended Euclidean Algorithm gives you $s,t\in\Bbb{Z}$ with $tp+sq=1$. Given this, the isomorphisms are as follows: \begin{align*} \phi:\Bbb{Z}_n&\longrightarrow\Bbb{Z}_p\oplus\Bbb{Z}_q & \psi=\phi^{-1}:\Bbb{Z}_p\oplus\Bbb{Z}_q&\longrightarrow\Bbb{Z}_n \\ (a+n\Bbb{Z})&\longmapsto((a+p\Bbb{Z}),(a+q\Bbb{Z})) & ((a+p\Bbb{Z}),(b+q\Bbb{Z})) &\longmapsto (btp+asq+n\Bbb{Z}) \end{align*} This works because $$ \phi(\psi(a+p\Bbb{Z},b+q\Bbb{Z}))=\phi(btp+asq+n\Bbb{Z}) = (asq+p\Bbb{Z},btp+q\Bbb{Z})=(a+p\Bbb{Z},b+q\Bbb{Z}), $$ where the final equality follows from $tp+sq=1$, because it translates to \begin{align*} tp&\equiv 1\mod q, \\ sq&\equiv 1\mod p. \end{align*} Now in the case $p=7$ and $q=3$, we have $t=-2$ and $s=5$, because $-14+15=1$. I hope this clarifies the construction of the map.