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

(f + g)(x) = (x^2 - 4) + (x + 2)

Write the sum.

(f + g)(x) = x^2 + x - 2

Combine like terms (see combining like terms)

(f - g)(x) = (x^2 - 4) - (x + 2)

Write the difference.

(f - g)(x) = x^2 - 4 - x - 2

Distribute the minus sign.

(f - g)(x) = x^2 - x - 6

Combine like terms.

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

(fg)(x) = (x^2 - 4)(x + 2)

Write the product.

x^2 \cdot x + x^2 \cdot 2 - 4 \cdot x - 4 \cdot 2

Multiply each term (see multiplying polynomials)

x^3 + 2x^2 - 4x - 8

Simplify each product.

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.

\left(\frac{f}{g}\right)(x) = \frac{x^2 - 4}{x + 2}

Write the quotient.

Find the restriction first. The denominator is 0 when x + 2 = 0, so x \ne -2.

\frac{(x + 2)(x - 2)}{x + 2}

Factor the numerator (see factoring the difference of squares)

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

(f + g)(3) = 5 + 5 = 10

Add the outputs.

(f + g)(3) = 3^2 + 3 - 2

Way 2, use the formula from Example 1.

9 + 3 - 2 = 10

Simplify.

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.

P(x) = 25x - (10x + 300)

Write the difference.

P(x) = 25x - 10x - 300

Distribute the minus sign.

P(x) = 15x - 300

Combine like terms.

P(50) = 15(50) - 300 = 750 - 300 = 450

Evaluate at 50.

15x - 300 = 0

Break even when profit is 0.

15x = 300

Add 300 to both sides.

x = 20

Divide both sides by 15.

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.

(3x - 1) + x^2

Write the sum.

(f + g)(x) = x^2 + 3x - 1

Reorder and combine.

2.

x^2 - (3x - 1)

Write the difference.

(g - f)(x) = x^2 - 3x + 1

Distribute the minus sign.

3.

(3x - 1)x^2

Write the product.

(fg)(x) = 3x^3 - x^2

Distribute.

4.

\left(\frac{f}{g}\right)(x) = \frac{3x - 1}{x^2}

Write the quotient.

The denominator is 0 when x = 0, so x \ne 0

(-\infty, 0) \cup (0, \infty)

Write the domain. Leave out 0, where the denominator is 0.

5.

Evaluate: f(2) = 3(2) - 1 = 5 and g(2) = 2^2 = 4

(f + g)(2) = 5 + 4 = 9

Add.

6.

Evaluate: f(-1) = 3(-1) - 1 = -4 and g(-1) = (-1)^2 = 1

(fg)(-1) = (-4)(1) = -4

Multiply.

7.

[0, \infty)

h needs x \ge 0, and k works for every x. Domain of h + k.

x - 4 = 0

For \frac{h}{k}, also remove k(x) = 0.

x \ne 4

Remove this value from the domain.

[0, 4) \cup (4, \infty)

Domain of \frac{h}{k}.

8.

\frac{x^2 - 25}{x + 5}

Write the quotient.

x + 5 \ne 0

The denominator cannot be 0.

x \ne -5

Solve for the excluded value.

\frac{(x + 5)(x - 5)}{x + 5}

Factor.

Cancel: x - 5 for x \ne -5

(-\infty, -5) \cup (-5, \infty)

Write the domain without −5.

9.

P(x) = 40x - (15x + 1000)

Write the difference.

P(x) = 40x - 15x - 1000

Distribute.

P(x) = 25x - 1000

Combine.

25x - 1000 = 0

Set to 0.

25x = 1000

Add 1000.

x = 40

Divide by 25. The answer is a number of items.

10.

A(x) = (x + 3)(x - 1)

Write the product.

x^2 - x + 3x - 3

Multiply (see multiplying binomials)

A(x) = x^2 + 2x - 3

Combine like terms.

A(5) = 25 + 10 - 3 = 32

Evaluate at 5. The area is in square units.

Want more practice? The Algebra 2 Unit 1 Practice Pack (Part 2) has 29 pages of problems on this and the other lessons in the unit, with step-by-step answers and a cheat sheet.

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