TOPIC

Subtracting functions

MY PROGRESS

Pug Score

0%

Best Streak

0 in a row

Study Points

+0

Overview

Practice

Watch

Read

Quiz

Next Steps


Get Started

Get unlimited access to all videos, practice problems, and study tools.

Unlimited practice
Full videos

Back to Menu

Topic Progress

Pug Score

0%

Videos Watched

0/0

Best Practice

No score

Read

Not viewed

Best Quiz

No attempts


Best Streak

0 in a row

Study Points

+0

Read

Subtracting Functions

This lesson explains how to subtract one function from another to form a new function, written as (f minus g)(x). It covers the subtraction formula, why the domain of the result is the overlap of both original domains, and walks through worked examples with polynomial and radical functions.

What does it mean to subtract functions?

Just like numbers, functions can be combined using addition, subtraction, multiplication, and division. Subtracting functions means you take two functions, \(f(x)\) and \(g(x)\), and build a brand new function by subtracting their outputs. This new function is usually written as \((f-g)(x)\), and it is defined by:

\( (f - g)(x) = f(x) - g(x) \)

In words: to subtract two functions, evaluate each function's rule and subtract the second rule from the first. The result is a single new expression in terms of \(x\).

Step-by-step process

To subtract functions correctly, follow these steps:

  1. Write down the expressions for \(f(x)\) and \(g(x)\).
  2. Write \(f(x) - g(x)\), putting \(g(x)\) inside parentheses.
  3. Distribute the negative sign across every term of \(g(x)\).
  4. Combine like terms to simplify.
  5. State the domain of the new function.

That third step is the one students most often get wrong. If \(g(x)\) has more than one term, the minus sign in front of the parentheses flips the sign of every term inside, not just the first one.

Worked example 1: polynomial functions

Let \(f(x) = 3x^2 + 5x - 4\) and \(g(x) = x^2 - 2x + 7\). Find \((f - g)(x)\).

\( (f-g)(x) = (3x^2 + 5x - 4) - (x^2 - 2x + 7) \)

Distribute the minus sign across the second parentheses:

\( = 3x^2 + 5x - 4 - x^2 + 2x - 7 \)

Now group and combine like terms:

\( = (3x^2 - x^2) + (5x + 2x) + (-4 - 7) \)

\( (f-g)(x) = 2x^2 + 7x - 11 \)

Since \(f(x)\) and \(g(x)\) are both polynomials with domain "all real numbers," the difference function also has domain all real numbers.

Seeing the difference on a graph

Consider \(f(x) = x^2\) and \(g(x) = x + 2\). Their difference is \((f-g)(x) = x^2 - x - 2\), which factors as \((x-2)(x+1)\). The graph below shows this difference function, crossing the x-axis exactly where \(x = -1\) and \(x = 2\).

Graph of the difference function h of x equals x squared minus x minus 2, showing x-intercepts at x = -1 and x = 2 Plot of y = x**2 - x - 2 for x in [-3, 4] -3 -2 -1 0 1 2 3 4 0 5 10 x (f - g)(x) zero at x = -1 zero at x = 2 vertex
Graph of \((f-g)(x) = x^2 - x - 2\)

Why the domain matters

Subtracting the rules of two functions is easy, but the domain of \((f-g)(x)\) is not automatically "all real numbers." A value of \(x\) can only be used in the new function if it was already allowed in both original functions. In other words:

domain of \((f-g)\) equals the intersection (overlap) of the domain of \(f\) and the domain of \(g\)

This becomes important whenever a function involves a square root, a fraction, or any other restriction. If you need a refresher on finding restrictions first, see how to write domain and range before working through the next example.

Worked example 2: functions with a restricted domain

Let \(f(x) = \sqrt{x - 1}\) with domain \(x \ge 1\), and let \(g(x) = x^2\) with domain all real numbers. Find \((f-g)(x)\) and its domain.

\( (f-g)(x) = \sqrt{x-1} - x^2 \)

This expression cannot be simplified further, since one term has a radical and the other is a polynomial. For the domain, take the intersection of \(x \ge 1\) (required by the square root) and all real numbers (allowed for \(x^2\)). The overlap is simply:

domain of \((f-g)(x)\): \(x \ge 1\)

A quick note on order

Subtraction is not commutative, so \((f-g)(x)\) is generally not equal to \((g-f)(x)\). For the polynomial example above, swapping the order gives \((g-f)(x) = -2x^2 - 7x + 11\), which is the exact opposite sign of every term in \((f-g)(x)\). Always subtract in the order the problem asks for.

Common mistakes to avoid

  • Forgetting to distribute the negative sign to every term of the second function.
  • Assuming the domain of the difference is automatically all real numbers without checking both original domains.
  • Mixing up the order of subtraction, since \((f-g)(x)\) and \((g-f)(x)\) are usually different functions.
  • Trying to combine unlike terms, such as a square root term and a polynomial term, into one expression.

Where this leads next

Once you are comfortable subtracting functions, the same combining skills show up again when you study the difference quotient and its applications, which uses function subtraction to measure how a function changes over an interval.

Related lessons