For the first: every x∈[−1,2] has x2∈[0,4], and every y∈[0,4] is attained as y=(y)2 with y∈[0,2]⊆[−1,2] — note that the image is not[1,4]={(−1)2,22}: images of intervals are not computed from endpoints alone. For the second: 1≤x2≤4⟺1≤∣x∣≤2, which splits into two pieces. The third illustrates that a preimage may be empty — f−1(B) always makes sense, however small the intersection of B with the image. Finally observe on this example the strictness phenomenon of the remark above: with A=[−1,0] and A′=[0,1], one has f(A∩A′)=f({0})={0}, while f(A)∩f(A′)=[0,1].
Example 1.27(Point (2) is sharp)
In Proposition 1.26 (2), one cannot upgrade the conclusions: g∘fbijective does not force fsurjective or ginjective. Take E=G={1}, F={1,2}, with f(1)=1 and g(1)=g(2)=1: then g∘f=idE is bijective, yet f misses the element 2 and g collapses both elements. The moral is a precise bookkeeping rule: composition information flows to the innermap for injectivity and to the outermap for surjectivity, never the other way. (Exercise 1.9 builds the same phenomenon with infinite sets, where it is the engine behind one-sided inverses.)
Example 1.28
f:R→R, x↦x2 is neither injective (f(−1)=f(1)) nor surjective (−1 has no preimage). Restricting the domain and codomain, f:R+→R+, x↦x2 is bijective, with inverse y↦y. A map’s injectivity or surjectivity depends on the announced domain and codomain, not only on the formula.