Function Operations
Function operations combine two functions by adding, subtracting, multiplying or dividing their outputs. For example, (f + g)(x) = f(x) + g(x). The new function’s domain includes only inputs that work in both functions, and for division you also remove any input that makes the denominator zero.
Before this lesson: You should know Function Notation, Adding and Subtracting Polynomials and Multiplying Polynomials.
The Four Operations
Two functions can be combined the same way numbers can. You combine their outputs for each input x.
| Operation | Definition | Read it as |
|---|---|---|
| Sum | (f + g)(x) = f(x) + g(x) | “f plus g of x” |
| Difference | (f - g)(x) = f(x) - g(x) | “f minus g of x” |
| Product | (fg)(x) = f(x) \cdot g(x) | “f times g of x” |
| Quotient | \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, where g(x) \ne 0 | “f over g of x” |
On a graph, the sum adds heights. At each x, the height of f + g is the height of f plus the height of g.
Domain of a Combined Function
- For f + g, f - g and fg, the domain is every x that is in the domain of f and the domain of g.
- For \frac{f}{g}, use the same inputs, then also remove every x where g(x) = 0.
- Find the domain from the original functions, before you simplify. Simplifying can hide a restriction.
How to Combine Functions
- Write the operation with each function in parentheses, like (x^2 - 4) - (x + 2).
- Simplify: combine like terms, distribute a minus sign, or multiply polynomials.
- For a quotient, factor and cancel common factors if you can, but keep the restriction g(x) \ne 0.
- State the domain.
Worked Examples
In Examples 1–4, f(x) = x^2 - 4 and g(x) = x + 2.
Example 1: Sum and difference
Find (f + g)(x) and (f - g)(x).
- Write the sum: (f + g)(x) = (x^2 - 4) + (x + 2)
- Combine like terms (see combining like terms): (f + g)(x) = x^2 + x - 2
- Write the difference: (f - g)(x) = (x^2 - 4) - (x + 2)
- Distribute the minus sign: (f - g)(x) = x^2 - 4 - x - 2
- Combine like terms: (f - g)(x) = x^2 - x - 6
Answer: (f + g)(x) = x^2 + x - 2 and (f - g)(x) = x^2 - x - 6. Both have domain (-\infty, \infty).
Example 2: Product
Find (fg)(x).
- Write the product: (fg)(x) = (x^2 - 4)(x + 2)
- Multiply each term (see multiplying polynomials): x^2 \cdot x + x^2 \cdot 2 - 4 \cdot x - 4 \cdot 2
- Simplify each product: x^3 + 2x^2 - 4x - 8
Answer: (fg)(x) = x^3 + 2x^2 - 4x - 8, with domain (-\infty, \infty).
Example 3: Quotient and its domain
Find \left(\frac{f}{g}\right)(x) and its domain.
- Write the quotient: \left(\frac{f}{g}\right)(x) = \frac{x^2 - 4}{x + 2}
- Find the restriction first. The denominator is 0 when x + 2 = 0, so x \ne -2.
- Factor the numerator (see factoring the difference of squares): \frac{(x + 2)(x - 2)}{x + 2}
- Cancel the common factor: x - 2, with x \ne -2
Answer: \left(\frac{f}{g}\right)(x) = x - 2 for x \ne -2. Domain: (-\infty, -2) \cup (-2, \infty). The graph is a line with a hole at x = -2.
Example 4: Evaluate a combination
Find (f + g)(3) two ways, and explain why \left(\frac{f}{g}\right)(-2) has no value.
- Way 1, evaluate each function first: f(3) = 3^2 - 4 = 5 and g(3) = 3 + 2 = 5
- Add the outputs: (f + g)(3) = 5 + 5 = 10
- Way 2, use the formula from Example 1: (f + g)(3) = 3^2 + 3 - 2
- Simplify: 9 + 3 - 2 = 10
- For the quotient, g(-2) = -2 + 2 = 0, and dividing by 0 is undefined.
Answer: (f + g)(3) = 10 both ways. \left(\frac{f}{g}\right)(-2) is undefined because x = -2 is not in its domain.
Example 5: Word problem with profit
A club sells T-shirts for $25 each, so its revenue is R(x) = 25x. Its costs are C(x) = 10x + 300. Write the profit function P = R - C. Find the profit for 50 shirts and the break-even point.
- Write the difference: P(x) = 25x - (10x + 300)
- Distribute the minus sign: P(x) = 25x - 10x - 300
- Combine like terms: P(x) = 15x - 300
- Evaluate at 50: P(50) = 15(50) - 300 = 750 - 300 = 450
- Break even when profit is 0: 15x - 300 = 0
- Add 300 to both sides: 15x = 300
- Divide both sides by 15: x = 20
Answer: P(x) = 15x - 300. Selling 50 shirts makes $450 profit. The club breaks even at 20 shirts.
Common Mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Not distributing the minus sign | (x^2 - 4) - (x + 2) = x^2 - 4 - x + 2 | Subtract every term: -x - 2. |
| Thinking fg means composition | Writing (fg)(x) = f(g(x)) | fg means multiply. Composition is a different operation, f \circ g. |
| Dropping the restriction after canceling | \frac{x^2 - 4}{x + 2} = x - 2 for every x | Keep x \ne -2, because the original quotient is undefined there. |
| Adding the inputs instead of the outputs | (f + g)(3) = f(6) | Add the outputs: f(3) + g(3). |
| Squaring only part of a product | (x^2 - 4)(x + 2) = x^3 - 8 | Multiply every term by every term. |
Practice Problems
In problems 1–6, f(x) = 3x - 1 and g(x) = x^2.
- Find (f + g)(x).
- Find (g - f)(x).
- Find (fg)(x).
- Find \left(\frac{f}{g}\right)(x) and its domain.
- Find (f + g)(2).
- Find (fg)(-1).
- Let h(x) = \sqrt{x} and k(x) = x - 4. Find the domain of h + k and the domain of \frac{h}{k}.
- Let f(x) = x + 5 and g(x) = x^2 - 25. Find \left(\frac{g}{f}\right)(x) and its domain.
- A bakery’s revenue is R(x) = 40x and its cost is C(x) = 15x + 1000. Find the profit function and the break-even point.
- A rectangle has length L(x) = x + 3 and width W(x) = x - 1. Write the area function A = LW and find A(5).
Show answers
- Write the sum: (3x - 1) + x^2
Reorder and combine: (f + g)(x) = x^2 + 3x - 1 - Write the difference: x^2 - (3x - 1)
Distribute the minus sign: (g - f)(x) = x^2 - 3x + 1 - Write the product: (3x - 1)x^2
Distribute: (fg)(x) = 3x^3 - x^2 - Write the quotient: \left(\frac{f}{g}\right)(x) = \frac{3x - 1}{x^2}
The denominator is 0 when x = 0, so x \ne 0
Domain: (-\infty, 0) \cup (0, \infty) - Evaluate: f(2) = 3(2) - 1 = 5 and g(2) = 2^2 = 4
Add: (f + g)(2) = 5 + 4 = 9 - Evaluate: f(-1) = 3(-1) - 1 = -4 and g(-1) = (-1)^2 = 1
Multiply: (fg)(-1) = (-4)(1) = -4 - h needs x \ge 0, and k works for every x. Domain of h + k: [0, \infty)
For \frac{h}{k}, also remove k(x) = 0: x - 4 = 0, so x \ne 4
Domain of \frac{h}{k}: [0, 4) \cup (4, \infty) - Write the quotient: \frac{x^2 - 25}{x + 5}
Restriction: x + 5 \ne 0, so x \ne -5
Factor: \frac{(x + 5)(x - 5)}{x + 5}
Cancel: x - 5 for x \ne -5
Domain: (-\infty, -5) \cup (-5, \infty) - Write the difference: P(x) = 40x - (15x + 1000)
Distribute: P(x) = 40x - 15x - 1000
Combine: P(x) = 25x - 1000
Set to 0: 25x - 1000 = 0
Add 1000: 25x = 1000
Divide by 25: x = 40 items - Write the product: A(x) = (x + 3)(x - 1)
Multiply (see multiplying binomials): x^2 - x + 3x - 3
Combine like terms: A(x) = x^2 + 2x - 3
Evaluate: A(5) = 25 + 10 - 3 = 32 square units
FAQ
What are the four operations on functions?
Addition, subtraction, multiplication and division. Each one combines the outputs f(x) and g(x) for the same input x.
How do you find the domain of f/g?
Start with the inputs that work in both f and g. Then remove every x that makes g(x) = 0.
Is (fg)(x) the same as f(g(x))?
No. (fg)(x) multiplies the two outputs. f(g(x)) puts the output of g into f, which is composition of functions, the next lesson.
Can you evaluate (f + g)(a) without finding the formula?
Yes. Find f(a) and g(a) separately and add them. It gives the same answer as using the combined formula.
Summary
- (f + g)(x) = f(x) + g(x), (f - g)(x) = f(x) - g(x), (fg)(x) = f(x)g(x), \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}.
- Put each function in parentheses, and distribute a minus sign to every term.
- The domain is the inputs shared by both functions. For a quotient, also remove zeros of the denominator.
- Keep restrictions even after you cancel factors.
Previous lesson: Piecewise Functions
Next lesson: Composition of Functions
Back to the Algebra 2 Index