# Finding the linear functions from a function composition.

This is a practice question in my book:

Find all linear functions $f$ such that $$(f \circ f)(x) = 4x+1.$$

Since linear functions are of the form $$ax + b$$

I do this: $$a(ax+b)+b\\ =a^2x+ab+b = 4x+1$$ If I solve the system $$a^2 = 4\\ ab+b = 1$$ I get two solutions: $$a = 2\\ b = \frac{1}{3}$$ However, I don't know what to do now. According to my book, the answer is that there are two functions: $$f_1=2x+\frac{1}{3}\\ f_2=-2x-1$$ I think I see the relation between my two solutions and the first function in the answer. But I don't know what happened with the second function in the answer. How did my book get that answer?

-
If $a^2 = 4$, then there are two solutions for $a$: $a = 2$ and $a = -2$. – Henry T. Horton Jul 8 '12 at 20:53
If $a^2=4$, $a$ can be either $2$ or $-2$. – Brian M. Scott Jul 8 '12 at 20:53

You also have $a = -2$ Since $$ab + b = b(1 + a) = -b,$$ you get $b = -1$. This gives you the second solution $y = -2x - 1$.