Composition of functions is a way to combine functions by feeding the output of one function into another, rather than adding, multiplying, subtracting, or dividing their outputs.
It creates a chain: you apply one function to x, take that result, and then apply a second function to that result.
Non-math analogy from the transcript:
Domain: people (in the example, the speaker’s own circle).
Mother function: outputs the speaker’s mother, Belinda.
Father function: outputs the speaker’s father, Keith.
Composition example 1 (mother then father): apply the mother function to the speaker to get Belinda, then apply the father function to Belinda to get Richard (the grandfather).
Composition example 2 (father then mother): apply the father function to the speaker to get Keith, then apply the mother function to Keith to get Shirley (the paternal grandmother).
Observation: the order of composition changes the outcome (e.g., maternal grandfather vs paternal grandmother).
Takeaway: after the first step, you use the result of that first function as the input to the second function.
This is the intuition behind composing functions, not simply combining their values statistically or arithmetically.
Notation and Definition
Definition of composition:
The composition of f and g is denoted as (f∘g)(x)=f(g(x)).
Read as: apply g to x, then apply f to the result.
Important idea: the inner function (g) is applied first, the outer function (f) second.
Formal Example Setup
The math-only setup from the transcript:
Let f be a radical function: f(x)=x+1.
Let g be a linear function: g(x)=3x−1.
Tasks: compute (f∘g)(3) and (g∘f)(−1).
Worked Example: (f ∘ g)(3)
Step 1: Understand the notation for this evaluation: first compute g(3), then plug that result into f.
Step 2: Compute g(3):
g(3)=3⋅3−1=9−1=8.
Step 3: Compute f(8):
f(8)=8+1=9=3.
Conclusion: (f∘g)(3)=3.
Worked Example: (g ∘ f)(-1)
Step 1: Compute the inner function f(−1) first:
f(−1)=−1+1=0=0.
Step 2: Apply g to that result: g(0)=3⋅0−1=−1.
Conclusion: (g∘f)(−1)=−1.
Key Takeaways and Observations
The order of composition matters: (f ∘ g)(x) generally differs from (g ∘ f)(x).
The typical workflow is: compute the inner function, then feed that result into the outer function.
Domain-awareness note: For the composition to be defined, the range of the inner function must lie within the domain of the outer function. In the example, f(x) = \sqrt{x+1} requires x ≥ -1; thus the inner output g(x) must lie in [−1, ∞) for (f ∘ g)(x) to be defined.
The explicit forms used in the example:
f(x)=x+1
g(x)=3x−1
Pronunciation: f∘g is read as “f composed with g.”
Connections to Foundational Principles
Domain and range interactions are central to function composition: you must ensure the inner function outputs values allowed in the outer function’s domain.
Composition underpins broader mathematical ideas such as the chain rule in calculus (where you differentiate a composed function) and function transformations.
In practical terms, composition models sequences of operations or data-processing pipelines, where the output of one step becomes the input to the next.
Real-World Relevance and Practical Implications
Data processing pipelines: apply a transformation (g) to data, then apply another transformation (f) to the result.
Programming and functional programming: chaining functions to form a data-processing chain or a sequence of operations.
Importance of order: swapping the order changes the result and potentially feasibility (domain constraints) of the composed function.
Quick Practice (Optional)
Given f(x) = \sqrt{x + 1} and g(x) = 3x - 1, compute:
(f ∘ g)(2)
(g ∘ f)(2)
Check domain constraints: for (f ∘ g)(x), ensure g(x) ≥ -1 for the expression under the square root to be defined.