f : [0, 1] → [–1, 1] g : [1, 1] → [–0, 2] g is injective & gof is surjective. ⇒ f must be surjective otherwise f(x) would not cover the whole co-domain [–1, 1] (which is also the domain of g) & then consecutively gof would not be able to cover the whole [0, 2] (as g is injective).