1

is composition associative?

How do we define this?

I thought I could counter example this with integers and mappings

$f_1(x)=1$, and $f_2(x) = f_3(x)=2x.$

But I couldn't get it work on paper only in my head which means I am probably wrong thx

alec
  • 31
  • 3
    How about you work out $(f\circ g)\circ h(x)$ and $f\circ(g\circ h)(x)$, and see what you can do from there? – a... Jan 09 '15 at 12:38
  • At least additive operations in the exponent of complex numbers (as bases) are not associative (in the terminology of that addition as functional composition) – Gottfried Helms Jan 09 '15 at 12:39
  • See also: https://math.stackexchange.com/questions/523906/show-that-function-compositions-are-associative – Martin Sleziak Jun 19 '17 at 08:33

2 Answers2

4

Composition is associative : Let $f, g, h$: $$\forall x \in D_{f, g, h}, ((f \circ g) \circ h)(x) = f(g(h(x))) = (f \circ (g \circ h))(x)$$

Hence $(f \circ g) \circ h = f \circ (g \circ h)$.

With two of the example you given, you can prove however that it is not commutative.

servabat
  • 1,509
0

Using your example, we test for associativity by comparing

$$f_1\circ (f_2\circ f_3)(x) \,\text{ and }\,(f_1\circ f_2)\circ f_3(x)$$

If we can establish equality, we will have shown that, yes, composition is associative.

So we test $$f_1\circ (f_2\circ f_3)(x) = f_1(f_2(f_3(x))) = (f_1\circ f_2)( f_3(x)) = (f_1\circ f_2)\circ f_3(x)$$

Hence, composition is associative.


Challenge: can you answer whether composition is commutative? That is, is it true that for all functions $f, g$, $$\;(f\circ g)(x) = (g\circ f)(x)\iff f(g(x)) = g(f(x))\;\;?$$

Hint: Try to find a counterexample to prove commutativity fails.

amWhy
  • 209,954
  • $f_1\circ(f_2(f_3(x)))$ doesn't make much sense to me. EDIT: now that it has been edited there is a step missing still. – a... Jan 09 '15 at 12:49
  • 1
    Downvote of this answer does not make sense. –  Sep 23 '17 at 13:57