Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

When does function composition commute? [duplicate]

Writer Emily Wong
$\begingroup$

I've read that function composition "generally does not commute."

Not counting compositions involving the identity function, and compositions of a function and its inverse, are there examples of functions on the reals (for example) $f, g$ where $fg = gf$ outside of these cases?

$\endgroup$ 1

2 Answers

$\begingroup$

There are plenty of examples:

$$ f(x) = x + 3,\ g(x) = x + 5: fg(x) = gf(x) = x + 8 $$ $$ f(x) = 5x,\ g(x) = 2x: fg(x) = gf(x) = 10x $$ $$ f(x) = x^4,\ g(x) = x^7: fg(x) = gf(x) = x^{28} $$

A common thread among these is that they involve commutative operations.

$\endgroup$ $\begingroup$

Take $f(x) = x^{2}$ and $g(x) = x^{3}$. Then $f(g(x)) = g(f(x)) = x^{6}$. So, $f$ and $g$ commute

$\endgroup$ 2