Quick question about showing surjection for the following homomorphic map Can someone please comment on whether my solution to the following is correct.
Let $h:\mathbb{Z}_{16}\rightarrow \mathbb{Z}_4$ be defined by $h([a]_{16})=[3a]_4$.  I want to show that this map is surjective.
Suppose $x\in \mathbb{Z}_{4}$, then $x=[3a]_4$ which implies $x\equiv 3a \pmod 4$, multiplying both sides by $3$, then $a\equiv 3x \pmod 4$, and is the $a$ we are looking for for any $x\in \mathbb{Z}_{4}$.  Hence $h$ is surjective.
 A: We only need to show that multiplication by $3$ is a surjection, then the claim follows.
Indeed, take any $[a]_4\in \mathbb{Z}_4$ represented by the integer $a$. By definition $gcd(3,4)=1$ so there are $x,y \in \mathbb{Z}$ s.t. $3x+4y=1$ by Bezouts lemma, so $3ax+4ay = a$ now reduce this equation $\mod 4$ and you are done. Here in this particular example we have that $3\cdot 3-2\cdot 4=1$.
A: First some preliminary comments:
Although you never address it, I am going to guess that you verified that this function is well defined. This is important. You need to show that if $[a]_{16}=[b]_{16}$, then $[3a]_{4} = [3b]_{4}$, so that the value of the map does not depend on the representative chosen.
This holds, since
$$\begin{align*}
[a]_{16}=[b]_{16}&\iff a\equiv b\pmod{16}\\
&\implies a\equiv b\pmod{4}\\
&\iff 3a\equiv 3b\pmod{4}
\end{align*}$$
with the last equivalence because $3$ is invertible modulo $4$. So the map is well defined.
Now, as to your attempt at proving surjectivity. To show that a function $f\colon A\to B$ is surjective we must show that:

For all $b\in B$ there exists $a\in A$ such that $f(a)=b$.

The basic way of doing this is to start with $b\in B$, and then produce or find some $a\in A$ and verifying that in fact $f(a)=b$ holds. There may be other ways of doing it in specific instances (for example, vector spaces you may verify that the image contains a basis of the codomain, and thus that the image must be the whole codomain), but that's the basic thing.
Now, this process of showing surjectivity often has two parts: analysis and synthesis.
In the analysis part, we assume that we have already found some $a$ with $f(a)=b$, and we see what conclusions we can derive about $a$ from this fact. This will establish necessary conditions that $a$ must satisfy in order to be a preimage of $b$. Because we are saying "if $a$ is a preimage of $b$, then $a$ must satisfy the following conditions."
Once we have completed the analysis part, we perform synthesis: we show that in fact there is an $a$ with $f(a)=b$, usually by taking the necessary conditions we found during analysis, and showing that in fact they are also sufficient: "if $a$ satisfies the following conditions, then $f(a)=b$."
It is really the synthesis that we are after, not the analysis. The analysis is the "scratch work" to achieve the synthesis.
You only performed the analysis. You said, paraphrased:

Let $[x]_{4}\in \mathbb{Z}_4$, and assume that there is an $[a]_{16}\in\mathbb{Z}_{16}$ such that $h([a]_{16})=[x]_4$. We have:
$$\begin{align*}
h([a]_{16}) = [x]_4 &\implies [3a]_{4}=[x]_4\\
&\implies 3a\equiv x\pmod{4}\\
&\implies 3(3a)\equiv 3x\pmod{4}\\
&\implies a\equiv 3x\pmod{4}.
\end{align*}$$

And you stopped there. Thus, you concluded that if $[a]_{16}$ is a preimage of $x$, then it must be the case that $a\equiv 3x\pmod{4}$.
What you are missing is a verification that in fact if $a\equiv 3x\pmod{4}$, then $h([a]_{16})=[x]_4$. That is, you are missing the synthesis.
To that end, pick any integer $x$ representing $[x]_4$, and let $a=3x$. We now consider $[a]_{16}=[3x]_{16}$: we have:
$$h([a]_{16}) = h([3x]_{16}) = [3(3x)]_{4} = [9x]_{4} = [x]_4.$$
Thus, $[a]_{16}$ is indeed a preimage of $[x]_4$. This proves that for every $[x]_{4}\in\mathbb{Z}_4$ there exists $[a]_{16}\in\mathbb{Z}_{16}$ such that $h([a]_{16}) = [x]_4$, so $h$ is surjective.

Often people skip the synthesis because the analysis consists of reversible steps. That is, the synthesis establishes an equivalence instead of an implication. For example, suppose we want to show that $f\colon \mathbb{R}\to\mathbb{R}$ given by $f(x)=3x-1$ is surjective. To that end, let $a\mathbb{R}$. Then, performing analysis, we might say
$$\begin{align*}
f(x)=a &\implies 3x-1 = a\\
&\implies 3x=a+1\\
&\implies x=\frac{1}{3}(a+1).
\end{align*}$$
But then we might realize: "Wait! Each of those steps is actually an 'if and only if'. What we actually have is:
$$\begin{align*}
f(x)=a &\iff 3x-1 = a\\
&\iff 3x=a+1\\
&\iff x=\frac{1}{3}(a+1).
\end{align*}$$
so that $f(x)=a$ if and only if $x=\frac{1}{3}(a+1)$." So we do not actually have to spell out the synthesis, since we can do the synthesis simply by reading the chain of equalities "from bottom to top".
This happens to be the case with your derivation: all the steps are actually reversible, but you did not state them that way. That means you must either verify that they are reversible, or else you must perform the synthesis explicitly. Otherwise, your work in incomplete.

Why does this matter? Because sometimes the analysis is not fully reversible.  So you must check to see if the conditions you have obtained are not just necessary, but also sufficient. Many people forget this, or are not used to checking this, often leading to "extraneous solutions" or "weird answers". See for example, this previous discussion, and here, and here, here, here, here, etc.
