Ok so the question we were given was:

Suppose that f is continuous with |f(x)| $\displaystyle \leqslant$ 1 for all x $\displaystyle \in$ R (R being the real numbers). Show that there exists some c $\displaystyle \in$ R such that f(c) = c. Hint: apply Bolzano's theorem on a suitable interval.

I tried a few different things originally, but I just couldn't get it out, and handed up my homework. I then found out that the solution he gave was:

"Being the diﬀerence of two continuous functions, g(x) = f(x) - x is continuous with

g(2) = f(2) - 2 $\displaystyle \leqslant$ 1 - 2 < 0

g(-2) = f(-2) + 2 $\displaystyle \geqslant$ -1 + 2 > 0

According to Bolzano’s theorem then, some c $\displaystyle \in$ (-2, 2) exists such that g(c) = 0."

I don't really understand how this proves that c $\displaystyle \in$ R such that f(c) = c, though? Also, why pick (-2, 2) as the interval for g? If someone could explain it to me please, that'd be very handy!