Normal Binomial Expansion and commutativity

algebra-precalculusbinomial theorem

I've already asked about this question in a different way, but I feel that I've gained a completely new understanding of it now. An answer is provided for the question, but I'm having trouble interpreting it. This is what is provided (it's not everything, I'm keeping it concise):

Q: Does the normal Binomial Expansion work with function composition? Why or why not?

A: Using the binomial expansion, $(a+b)^2 = a^2+2ab+b^2$. If we FOIL as normal we get $(a+b)^2=a^2+ab+ba+b^2$. For the answers to be the same then, ab = ba, or the operation must be commutative. Since function composition is not commutative by contradiction, or it is not always true that $fog(x) = gof(x)$, we can conclude that the normal Binomial Expansion theorem does not hold with function composition.

My thinkings/confusions on this:

(1) I have tried to write this out in ways such as $(fog(x)+gof(x))^2$ and $(f(x)+g(x))^2$, but none seem to work. Using these two as representations simply led to the conclusion that the binomial expansion does work. Is it possible for this situation to be modeled with a correct binomial form $(a+b)^2$, or does the question have abstraction that doesn't let that happen? If we can, what should a and b be?

(2) The answer is telling us that ab not being ba is the same thing as $fog(x)$ not being $gof(x)$, but I don't understand, aren't these two completely different commutativities (don't worry, I know that's not a word). $ab$ has to do with multiplication, $a*b$. Doesn't the non commutativeness of function composition get broken when we multiply. How can we take the statement that $fog(x)$ is not $gof(x)$, and use it to imply that two things multiplied, with relation to function composition, don't follow the commutative property of multiplication?

Best Answer

You should think about it like this $(f\circ g)(x)\cdot (g\circ f)(x)= f(g(x))\cdot g(f(x))=g(f(x))\cdot f(g(x))=(g\circ f)(x)\cdot (f\circ g)(x)$

In essence, it is true that $(f\circ g)(x)\neq (g\circ f)(x)$
Each composition will give a new function. Lets name these functions.
Let $(f\circ g)(x) = h(x)$
Let $(g\circ f)(x) = j(x)$
We know that $h(x)j(x)=j(x)h(x)$ since this is not a composition. Then $$(h(x)+j(x))^2=(h(x))^2+h(x)j(x)+j(x)h(x)+(j(x))^2=(h(x))^2+2h(x)j(x)+(j(x))^2$$ Since $h(x)j(x)=j(x)h(x)$.

Related Question