Let $S \neq \emptyset $ and $(G,\cdot ) $ group. On set $G^{S} = \{ f \colon S \to G\}$ we define operation $*$ $$(f * g)(s) = f(s) \cdot g(s) , \forall s \in S.$$ Prove: $ (G^{S},*)$ is abelian group if and only if $(G,\cdot )$ is abelian.
I am having trouble with proving that $(G,\cdot )$ is abelian. If we choose $a,b \in G$ there is no guarantee that there will be $c,d \in S$ nor $f,g \in G^{S}$ so that $ a = f(c) $ and $ b = g(d) $, and even when that happens, how can we prove that $a \cdot b = b \cdot a $ (case $c \neq d) $. Am I missing something obvious?
$G^S$ is the space of all functions $S\to G$. So given any $a, b\in G$, there is an element $s\in S$ and functions $f, g:S\to G$ such that $f(s) = a, g(s) = b$ (for instance, you can let $f$ and $g$ be suitable constant functions). Then since $f*g = g*f$ by assumption, we have $$ a\cdot b = f(s)\cdot g(s) = (f*g)(s) = (g*f)(s) = g(s)\cdot f(s) = b\cdot a $$ There is no need to have two different elements of $S$ for this. Translating between $\cdot $ and $*$ only works when both functions are fed the same input. So it makes sense to make sure that the two functions are fed the same input.