I was given the following question for homework, but it makes no sense to me.
Let $F$ be a free abelian group over a set $S$ with respect to the function $\varphi \colon S \to F$. Identify the set $S$ with the set $\varphi(S) \subset F$. The set $\varphi(S)$ is called a basis for $F$. Prove that every element $g \in F$ can be expressed uniquely as a product of elements of $\varphi(S)$.
Since when are free abelian groups constructed w.r.t maps? Isn't the set $S$ all that matters? I don't understand what I need to do...
A free abelian group on a set $S$ is determined by a pair $(F,\varphi)$, where $F$ is an abelian group and $\varphi\colon S\to F$ such that the following property is satisfied:
Note that such $\varphi$ must be injective. Indeed, suppose $\varphi(x)=\varphi(y)$, with $x\ne y$. Define the map $f\colon S\to\{1,-1\}$ by $$ f(s)=\begin{cases} 1 & \text{if $s\ne y$}\\ -1 & \text{if $s=y$} \end{cases} $$ Then no group homomorphism $g\colon F\to\{1,-1\}$ can exist such that $g\circ\varphi=f$.
Therefore the identification of $s\in S$ with $\varphi(s)\in F$ can be done, but it's not really necessary.
What the exercise wants you to show (albeit asked in a sloppy way) is that for every $x\in F$ there exist $s_1,s_2,\dots,s_n$ (pairwise distinct and determined up to the order) and unique integers $k_1,k_2,\dots,k_n$, such that $x=\varphi(s_1)^{k_1}\varphi(s_2)^{k_2}\dots\varphi(s_n)^{k_n}$. More precisely,
for every $x\in F$ there exist $n\in\mathbb{N}$, $s_1,\dots,s_n\in S$ and integers $k_1,\dots,k_n$ with $x=\varphi(s_1)^{k_1}\dots\varphi(s_n)^{k_n}$;
if $x\in F$ and $x=\varphi(s_1)^{k_1}\dots\varphi(s_n)^{k_n}= \varphi(t_1)^{h_1}\dots\varphi(t_m)^{h_m}$, with $s_1,\dots,s_n\in S$ pairwise distinct and $t_1,\dots,t_m\in S$ pairwise distinct, then $m=n$ and there exists a permutation $\sigma$ of $\{1,2,\dots,n\}$ such that $t_{\sigma(i)}=s_i$ and $k_i=h_i$ (for $i=1,2,\dots,n$).
It's handier to write $s$ instead of $\varphi(s)$, so in most cases the identification is done.