-1

How do I prove that if A is set and each of f and g is a function from A to A, then f o g = g o f?

Edit: If this is not true how can I prove that it is false using sets?

  • 4
    @Zack. But the statement you want to prove is not true. – Clement C. May 15 '16 at 20:54
  • If $f:\mathbb{R}\to \mathbb{R} ; x\mapsto x^2$ and $g:\mathbb{R}\to \mathbb{R} ; x\mapsto -x$ Then $(f \circ g)(x)=f(g(x)) = f(-x)=(-x)^2 = x^2$ But $(g \circ f)(x) = g(f(x)) = g(x^2) = -x^2$ And thus $f \circ g \neq g\circ f$. Thus, it can't be proven, because it's wrong, composition of functions cannot be trivially exchanged – Maximilian Gerhardt May 15 '16 at 20:56
  • It is not true in general, and there are several examples on MSE with commuting and non-commuting examples. Have a look ! – Dietrich Burde May 15 '16 at 20:57

2 Answers2

1

You won't, because it's not true. For instance let $A=\mathbb Z$, $f(n)=2n$, $g(n)=n^2$. Then $$ f\circ g(n)=2n^2,\ \ g\circ f(n)=4n^2. $$

Martin Argerami
  • 205,756
0

If $A$ has at most two elements, it is easy to show that the statement is true, by checking the few possibilities.

If $A$ has at least three elements, pick $a,b,c \in A$ distinct. Define $f(a)=b, f(b)=c, f(c)=a$ and $f(x)=x$ otherwise. Also define $g(a)=b, g(b)=a, g(c)=c$ and $g(x)=x$ otherwise. Show that they are bijections but $$f \circ g(c) = a \neq b =g \circ f(c)$$

N. S.
  • 132,525