# Associativity of pointwise addition of functions

A quick check: Is it safe to claim that pointwise addition of functions (in general) is associative? where pointwise addition of functions is defined by $(f+g)(x)=f(x)+g(x)$. If not, I guess it is at least true for continuous functions on a closed interval? How general can I go? What are the conditions for this to be true?

-
If the codomain of these functions are the same, and addition is defined on the codomain and that is associative, it is true! :) (And you don't need continuity for it. – user21436 Feb 16 '12 at 8:31
@KannappanSampath: Thank you :) – luis Feb 16 '12 at 8:52

This is the most general setting: if $A$ is a set with an associative operation $\star$, and $S$ is any set, the collection of functions $f:S\to A$ (often denoted $A^S$) has a natural associative operation $\bullet$ defined by $$(f\bullet g)(s)=f(s)\star g(s).$$ This operation $\bullet$ is associative, because $$(f\bullet (g\bullet h))(s)=f(s)\star(g\bullet h)(s)=f(s)\star(g(s)\star h(s))=$$
$$(f(s)\star g(s))\star h(s)=(f\bullet g)(s)\star h(s)=((f\bullet g)\bullet h)(s).$$ In the case you're asking about, $A$ would be the real numbers, and $\star$ would be addition. So yes, you are safe, in that the statement is true; but depending on the course, your teacher may expect you to prove that it is true, in which case you'd use the argument above.
Hint: a product of semigroups is a semigroup. Apply this to the power $\:G^I = \{f:I\to G\}$.