3
$\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
    $\begingroup$ The question math.stackexchange.com/questions/11431/… is a generalization of this one. That means on one hand its answers are answers to this question, on the other hand they are more abstract. $\endgroup$
    – David K
    Commented Mar 17, 2015 at 16:55

2 Answers 2

3
$\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$
2
$\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
  • $\begingroup$ I think the example is correct, but the math is wrong: $f(g(x)) = (x^2)^3 = g(f(x)) = (x^3)^2 = x^6$ $\endgroup$
    – Dair
    Commented Mar 17, 2015 at 16:50
  • $\begingroup$ Oh I thought you where talking about the multiplication of functions, because I saw no $\circ$ in your question $\endgroup$
    – Peter
    Commented Mar 17, 2015 at 16:51

Not the answer you're looking for? Browse other questions tagged .