My professor told me that when we have $f$: $A \rightarrow B$, a homomorphism, it is sufficient to show 1 mapping to "represent" the homomorphism, i.e., say, $f$ maps $a_1 \mapsto b_3$.
I don't quite understand why this is the case though. Shouldn't there be a "function" representation of a homomorphism, since you're applying it to all elements of $A$? For instance, instead of saying $f$ maps $a_1 \mapsto b_3$, why shouldn't it be, say, $f$ = $2a$ + $4$ or something? Any clarifications would be great. Thank you.
A function should associate to each element in the domain an element in the codomain. Thus, the definition of a function should be such that you can determine for each element in the domain which element of the codomain it is mapped to. This can be done in various ways. Consider the groups $A = \mathbb Z/3 \mathbb Z = \{[0],[1],[2]\}$ and $B = \mathbb Z/9\mathbb Z = \{[0],\ldots,[8]\}$. Let me define the same homomorphism $f: A \to B$ in a variety of ways. We could say $$ f([x]) = [3x]. $$ This is "given by a formula", and you can then check for yourself that this represents a group homomorphism. Another way is as follows: $$ f([0]) = [0],\quad f([1]) = [3],\quad f([2]) = [6]. $$ Again, it is clear for each element of the domain which element of the codomain it is mapped to, because all the possibilities are all explicitly listed. However, it is not "given by a formula" the way the previous definition worked.
Here is a third way, which works only because we know that we are defining $f$ to be a group homomorphism: $$ f([1]) = [3]. $$ A priori, this defines $f$ only on the element $[1] \in A$. But, we know that group homomorphisms have to preserve the neutral element, so we already know that $f([0]) = [0]$. Also, we have $$ f([2]) = f([1] + [1]) = f([1]) + f([1]) = [3] + [3] = [6]. $$ Thus, again, we know for each element in the domain to which element in the codomain it is mapped, making this a valid definition. However, it is only correct because we konw that $f$ is determined by its value on $[1]$. In fact, this is because $[1]$, by itself, is a generator of the group $A$.