# Thread: Composition of Two Functions

1. ## Composition of Two Functions

This is a question by PapaSmurf:
2)

Let and f(x) = 9x + k and g(x) = kx + 9.
Find the product of all distinct k such that f(g(x)) = g(f(x)). [Word for word, no typos]

2. Given that

$f(x)=9x+k \quad g(x)=kx+9$

then

$f(g(x))=9(kx+9)+k \quad \text{ and } \quad g(f(x))=k(9x+k)+9$

setting them equal and expanding gives

$9kx+81+k=9kx+k^2+9 \iff k^2-k-72=0$

Now just solve for k and multiply the two solutions together.

3. Awesome, thank you

But, I don't completely understand what you mean at the end.
Now just solve for k and multiply the two solutions together.
I get $k = 9, -8$
but don't understand where to go from there... would that be my answer?

4. In the original problem statement is says find the product all of distinct k.

Well you have the two distinct values of k so find their product so multiply them together.