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.

OperationDefinitionRead 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.

Coordinate grid with three lines. Blue: f(x) = x − 1. Orange: g(x) = 0.5x + 1. Green: their sum, (f + g)(x) = 1.5x. At x = 2, f(2) = 1 and g(2) = 2, and the sum is 3: the height of the green line is the blue height plus the orange height.
At x = 2, f is 1 and g is 2, so f + g is 3.

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

  1. Write the operation with each function in parentheses, like (x^2 - 4) - (x + 2).
  2. Simplify: combine like terms, distribute a minus sign, or multiply polynomials.
  3. For a quotient, factor and cancel common factors if you can, but keep the restriction g(x) \ne 0.
  4. 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).

  1. Write the sum: (f + g)(x) = (x^2 - 4) + (x + 2)
  2. Combine like terms (see combining like terms): (f + g)(x) = x^2 + x - 2
  3. Write the difference: (f - g)(x) = (x^2 - 4) - (x + 2)
  4. Distribute the minus sign: (f - g)(x) = x^2 - 4 - x - 2
  5. 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).

  1. Write the product: (fg)(x) = (x^2 - 4)(x + 2)
  2. Multiply each term (see multiplying polynomials): x^2 \cdot x + x^2 \cdot 2 - 4 \cdot x - 4 \cdot 2
  3. 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.

  1. Write the quotient: \left(\frac{f}{g}\right)(x) = \frac{x^2 - 4}{x + 2}
  2. Find the restriction first. The denominator is 0 when x + 2 = 0, so x \ne -2.
  3. Factor the numerator (see factoring the difference of squares): \frac{(x + 2)(x - 2)}{x + 2}
  4. 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.

  1. Way 1, evaluate each function first: f(3) = 3^2 - 4 = 5 and g(3) = 3 + 2 = 5
  2. Add the outputs: (f + g)(3) = 5 + 5 = 10
  3. Way 2, use the formula from Example 1: (f + g)(3) = 3^2 + 3 - 2
  4. Simplify: 9 + 3 - 2 = 10
  5. 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.

  1. Write the difference: P(x) = 25x - (10x + 300)
  2. Distribute the minus sign: P(x) = 25x - 10x - 300
  3. Combine like terms: P(x) = 15x - 300
  4. Evaluate at 50: P(50) = 15(50) - 300 = 750 - 300 = 450
  5. Break even when profit is 0: 15x - 300 = 0
  6. Add 300 to both sides: 15x = 300
  7. 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

MistakeExample of the errorFix
Not distributing the minus sign(x^2 - 4) - (x + 2) = x^2 - 4 - x + 2Subtract every term: -x - 2.
Thinking fg means compositionWriting (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 xKeep 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 - 8Multiply every term by every term.

Practice Problems

In problems 1–6, f(x) = 3x - 1 and g(x) = x^2.

  1. Find (f + g)(x).
  2. Find (g - f)(x).
  3. Find (fg)(x).
  4. Find \left(\frac{f}{g}\right)(x) and its domain.
  5. Find (f + g)(2).
  6. Find (fg)(-1).
  7. Let h(x) = \sqrt{x} and k(x) = x - 4. Find the domain of h + k and the domain of \frac{h}{k}.
  8. Let f(x) = x + 5 and g(x) = x^2 - 25. Find \left(\frac{g}{f}\right)(x) and its domain.
  9. 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.
  10. 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
  1. Write the sum: (3x - 1) + x^2
    Reorder and combine: (f + g)(x) = x^2 + 3x - 1
  2. Write the difference: x^2 - (3x - 1)
    Distribute the minus sign: (g - f)(x) = x^2 - 3x + 1
  3. Write the product: (3x - 1)x^2
    Distribute: (fg)(x) = 3x^3 - x^2
  4. 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)
  5. Evaluate: f(2) = 3(2) - 1 = 5 and g(2) = 2^2 = 4
    Add: (f + g)(2) = 5 + 4 = 9
  6. Evaluate: f(-1) = 3(-1) - 1 = -4 and g(-1) = (-1)^2 = 1
    Multiply: (fg)(-1) = (-4)(1) = -4
  7. 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)
  8. 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)
  9. 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
  10. 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