Read this lesson as text
Function Composition
Discrete Math · Axiom Academy
Building new functions by combining existing ones: understanding how (g ∘ f)(x) = g(f(x)) creates powerful mathematical pipelines. Think of it as a pipeline: first apply f to x , then apply g to the result. The output of f becomes the input of g . Let's see composition in action with specific functions: First apply f : f(3) = 2(3) + 1 = 7 Then apply g to that result: g(7) = 7² = 49 3. Domain and Codomain Compatibility Not all function pairs can be composed! For g ∘ f to exist, the codomain of f must be compatible with the domain of g . 4. Composition Preserves Properties One of the most important theorems about composition concerns bijections (functions that are both injective and surjective). Why this matters: This tells us that composing "perfect" functions (bijections) gives us another "perfect" function. We can build complex bijections from simple ones! 5. Proof Sketch: Composition of Bijections Let's see why the composition of two bijections is also a bijection. We need to prove both injectivity and surjectivity. Injective: Suppose (g ∘ f)(x₁) = (g ∘ f)(x₂). Then g(f(x₁)) = g(f(x₂)). Since g is injective, f(x₁) = f(x₂). Since f is injective, x₁ = x₂. ✓ Surjective: Take any c ∈ C. Since g is surjective, there exists b ∈ B with g(b) = c. Since f is surjective, there exists a ∈ A with f(a) = b. Then (g ∘ f)(a) = g(f(a)) = g(b) = c. ✓
This is the written version of the interactive lesson above. See the full Discrete Math course.