Proofs about composite functions, tested on concrete tables: g∘f injective forces f injective, g∘f surjective forces g surjective — and the arrow diagrams show exactly why the converses fail (g need not be injective, f need not be surjective). For bijections, (g∘f)−1=f−1∘g−1 is computed out loud.
f(a1)=f(a2)⟹g(f(a1))=g(f(a2))
(g∘f)−1=f−1∘g−1
Examples & Exercises
Prove completely that if g∘f is injective then f is injective. Then use the scene's injective-chain tables (f=[0,1], g=[0,1,0]) to confirm that this hypothesis guarantees nothing about g itself (g(0)=g(2)=0).
f(a1)=f(a2)⇒g(f(a1))=g(f(a2))⇒a1=a2
g∘f=[0,1] injective,g(0)=g(2)=0⇒g not injective
injective-chain: A=[0,1], B=[0,1,2], C=[0,1], f=[0,1], g=[0,1,0], composition g∘f=[0,1] (injective). f injective ✓, g injective ✗.Show proof
Assume f(a1)=f(a2). Applying g to both sides gives (g∘f)(a1)=g(f(a1))=g(f(a2))=(g∘f)(a2). By hypothesis g∘f is injective, so a1=a2 — hence f is injective. In the picture: if the composite arrows recover the starting point uniquely, so do the first-stage arrows.
The converse fails: in the scene's tables, g∘f=[0,1] is injective and f=[0,1] is injective, yet g=[0,1,0] satisfies g(0)=g(2)=0 and is not injective. The later map g may collide freely outside the image of f without affecting the composite's injectivity (here 2∈B lies outside the image of f).
Prove completely that if f and g are both bijective then g∘f is bijective and (g∘f)−1=f−1∘g−1, using associativity to show both products are the identity. Also verify directly on the scene's bijective tables that g∘f comes out as the identity.
First regroup (f−1∘g−1)∘(g∘f) by associativity: (f−1∘g−1)∘(g∘f)=f−1∘(g−1∘g)∘f. Since g is bijective, g−1∘g=idB, and since f is bijective, f−1∘idB∘f=f−1∘f=idA — a left inverse.
The other direction is the same: (g∘f)∘(f−1∘g−1)=g∘(f∘f−1)∘g−1=g∘idB∘g−1=idC — a right inverse. Having both a left and a right inverse makes g∘f bijective with inverse f−1∘g−1 (uniqueness of inverses).
Direct check on the scene's tables: with f=[1,2,0] and g=[2,0,1], (g∘f)(0)=g(f(0))=g(1)=0, (g∘f)(1)=g(2)=1, (g∘f)(2)=g(0)=2, so g∘f=[0,1,2] — the identity. For the inverse tables f−1=[2,0,1], g−1=[1,2,0]: (f−1∘g−1)(0)=f−1(g−1(0))=f−1(1)=0, then f−1(2)=1 at (1) and f−1(0)=2 at (2) — again [0,1,2], matching (g∘f)−1=f−1∘g−1 as verified by brute force in the model.
Prove completely that if g∘f is surjective then g is surjective. Then use the scene's surjective-chain tables (f=[0,1], g=[0,1,0], B=[0,1,2]) to check why f fails to be surjective (it misses 2) while the composition g∘f=[0,1] still covers all of C.
c∈C⇒∃a:g(f(a))=c⇒b=f(a) has g(b)=c
g∘f=[0,1] surjective onto C,2∈/f(A)⇒f not surjective
Take any c∈C. Since g∘f is surjective, there is a∈A with g(f(a))=c. Setting b=f(a)∈B gives g(b)=g(f(a))=c — so c has a g-preimage, and g is surjective. In the picture: if the composite arrows hit every point of C, the later arrows must too.
The first map f need not be surjective: in this example f=[0,1] misses the element 2 of B and is not surjective, yet g=[0,1,0] hits both elements of C via g(0)=0, g(1)=1, so the composition g∘f=[0,1] is surjective. Whatever g does outside the image of f is invisible to the composition (here g(2)=0).