Composition in Math- Combining Functions Explained
What Combining Functions Actually Means
Combining functions is exactly what it sounds like—taking two or more functions and merging them into one. In math, this means creating a new function from existing ones using arithmetic operations or composition.
You do this all the time without realizing it. When you calculate f(g(x)), you're combining functions. When you add f(x) + g(x), you're combining functions. The concept is straightforward. The execution trips most people up.
The Two Ways to Combine Functions
There are only two real methods:
- Arithmetic combination — add, subtract, multiply, or divide the outputs of separate functions
- Composition — use one function's output as the input for another function
That's it. Everything else is just variations on these two ideas.
Arithmetic Combination
When you combine functions arithmetically, you perform operations on their results. If f(x) = 2x and g(x) = x + 3:
- Addition:
(f + g)(x) = f(x) + g(x) = 2x + (x + 3) = 3x + 3 - Subtraction:
(f - g)(x) = f(x) - g(x) = 2x - (x + 3) = x - 3 - Multiplication:
(fg)(x) = f(x) · g(x) = 2x(x + 3) = 2x² + 6x - Division:
(f/g)(x) = f(x) / g(x) = 2x / (x + 3)
You replace the operator with the actual operation on the function values. Simple, but domain restrictions apply—more on that in a moment.
Function Composition
Composition is different. You're not doing math on the outputs—you're feeding one output into another function.
Notation: (f ∘ g)(x) means "apply g first, then apply f to that result." This reads as "f of g of x."
Example: if f(x) = x² and g(x) = x + 1, then:
(f ∘ g)(x) = f(g(x)) = f(x + 1) = (x + 1)²
The output of g(x) becomes the input for f. Order matters. (g ∘ f)(x) = g(f(x)) = g(x²) = x² + 1—which is completely different.
Domain Restrictions: The Part Most People Skip
When you combine functions, you have to think about what inputs are actually allowed. This is where combined functions get tricky.
For Arithmetic Combinations
The domain of a combined function is the intersection of the domains of the individual functions, with extra restrictions depending on the operation:
- Addition, subtraction, multiplication: domain is where both original functions exist
- Division: domain is where both functions exist AND the denominator function is not zero
Example: f(x) = √x and g(x) = 1/(x - 2)
The combined function (f/g)(x) = √x / (1/(x - 2)) requires:
x ≥ 0(from f)x ≠ 2(from g's denominator)
So the domain is [0, 2) ∪ (2, ∞).
For Composition
The domain of (f ∘ g)(x) is the set of x-values in g's domain where g(x) falls within f's domain.
Example: f(x) = √x and g(x) = x - 4
(f ∘ g)(x) = √(x - 4)
For this to work, we need x - 4 ≥ 0, so x ≥ 4. The domain is [4, ∞).
Comparing Function Combination Methods
| Method | Notation | What Happens | Domain Consideration |
|---|---|---|---|
| Addition | (f + g)(x) | Outputs added together | Intersection of both domains |
| Subtraction | (f - g)(x) | Outputs subtracted | Intersection of both domains |
| Multiplication | (fg)(x) | Outputs multiplied | Intersection of both domains |
| Division | (f/g)(x) | Outputs divided | Intersection, excluding where g(x) = 0 |
| Composition | (f ∘ g)(x) | Output of g becomes input of f | Domain of g, restricted to where g(x) is valid for f |
Getting Started: How to Combine Functions Step by Step
Here's the process for combining any two functions:
For Arithmetic Combination
- Write out both functions clearly
- Replace the function names with their expressions
- Simplify the algebraic result
- Determine the domain by checking both original functions
- Apply any operation-specific restrictions (especially for division)
Example: Combine f(x) = 3x - 5 and g(x) = x² using multiplication.
(fg)(x) = (3x - 5) · x²= 3x³ - 5x²- Domain: all real numbers (both functions are defined everywhere)
For Composition
- Identify which function is applied first (inner function)
- Substitute the inner function's expression wherever you see its input variable in the outer function
- Simplify the result
- Find the domain: start with the inner function's domain, then check what outputs are valid for the outer function
Example: Find (g ∘ f)(x) where f(x) = 2x + 1 and g(x) = x² - 4.
- Inner function: f(x) = 2x + 1
- Substitute:
g(f(x)) = (2x + 1)² - 4 = 4x² + 4x + 1 - 4 = 4x² + 4x - 3- Domain: all real numbers (both functions are polynomials)
Common Mistakes to Avoid
- Reversing composition order.
f(g(x))is not the same asg(f(x)). Write it out in the correct sequence. - Ignoring domain restrictions. A combined function is only valid where all operations are defined. Always check.
- Distributing incorrectly. When multiplying, distribute to every term. When composing, don't distribute—substitute the entire expression.
- Forgetting to simplify. Raw combined expressions are often messier than they need to be. Simplify first.
Where You'll Actually Use This
Combining functions isn't just textbook material. It shows up in:
- Physics: calculating compound motion where position is a function of time, and velocity is the derivative of position
- Economics: revenue functions combine price and quantity functions
- Computer science: nested function calls are compositions
- Engineering: system responses combine multiple input-output relationships
Anywhere you have dependent relationships, you're combining functions.
Quick Reference for Notation
(f + g)(x)— f plus g of x(f - g)(x)— f minus g of x(fg)(x)orf(x)·g(x)— f times g of x(f/g)(x)— f divided by g of x(f ∘ g)(x)orf(g(x))— f of g of x
Master these four operations and one composition method, and you can combine any functions you encounter. The key is checking your domain after you combine—most errors come from forgetting that restriction step.