MathBored

Essential Math Primer
← Back to Primer Overview
H36 • Lesson 58 of 105

Function Notation & Composition

Function notation, evaluation, composition of functions

High School Essentials • 9-12

Prerequisites: M26

Key Concepts

  • notation
  • evaluation
  • composition

Function Notation & Composition

Functions are the language of mathematics. The notation f(x) -- read "f of x" -- is far more than a label; it precisely communicates which function is being used, what the input is, and what the output will be. This lesson covers how to read, evaluate, and combine functions, laying the groundwork for all of higher mathematics.

Understanding f(x) Notation

When we write f(x) = 2x + 3, we are defining a rule named f that takes any input x and produces the output 2x + 3. The notation f(x) does not mean "f times x." It means "the output of function f when the input is x."

We can use any letter for the function name (f, g, h, etc.) and any variable for the input. The expression f(5) means "evaluate the function f at x = 5."

Worked Example 1 -- Evaluating Functions

Given f(x) = x2 - 4x + 1, find f(3), f(-2), and f(a + 1).

  1. f(3) = (3)2 - 4(3) + 1 = 9 - 12 + 1 = -2.
  2. f(-2) = (-2)2 - 4(-2) + 1 = 4 + 8 + 1 = 13.
  3. f(a + 1) = (a + 1)2 - 4(a + 1) + 1 = a2 + 2a + 1 - 4a - 4 + 1 = a2 - 2a - 2.

Notice that for f(a + 1), you replace every x with the entire expression (a + 1), using parentheses to ensure correct evaluation.

Domain and Range

The domain is the set of all valid inputs. The range is the set of all possible outputs.

Function TypeDomain RestrictionExample
PolynomialAll real numbersf(x) = x2 + 1
RationalDenominator cannot equal 0g(x) = 1/(x - 3), domain: x is not 3
Square rootExpression under radical must be ≥ 0h(x) = sqrt(x - 2), domain: x ≥ 2

Worked Example 2 -- Finding Domain

Find the domain of g(x) = sqrt(5 - x).

  1. The expression under the square root must be non-negative: 5 - x ≥ 0.
  2. Solve: -x ≥ -5, so x ≤ 5.
  3. Domain: all real numbers x such that x ≤ 5, or in interval notation: (-infinity, 5].

Function Composition

Composition chains two functions together: the output of one becomes the input of the other. The notation (f ∘ g)(x) or f(g(x)) means "first apply g to x, then apply f to the result."

Think of it as a two-step process: g processes the input first, producing g(x). Then f takes that result and produces f(g(x)).

Worked Example 3 -- Composing Functions

Let f(x) = 3x + 1 and g(x) = x2 - 2. Find f(g(x)) and g(f(x)).

f(g(x)): Replace x in f with g(x):

  1. f(g(x)) = 3[g(x)] + 1 = 3(x2 - 2) + 1 = 3x2 - 6 + 1 = 3x2 - 5.

g(f(x)): Replace x in g with f(x):

  1. g(f(x)) = [f(x)]2 - 2 = (3x + 1)2 - 2 = 9x2 + 6x + 1 - 2 = 9x2 + 6x - 1.

Notice that f(g(x)) is not equal to g(f(x)). Composition is not commutative -- order matters.

Common Mistake: Treating f(x) as Multiplication

f(x) = x + 3 does not mean f * x = x + 3. The notation f(2) means "substitute 2 for x," giving 2 + 3 = 5. Similarly, f(a + b) means substitute (a + b) for x, not f * a + f * b.

Evaluating Composition Step by Step

When computing f(g(2)), work from the inside out. First find g(2), then plug that number into f. This avoids errors from trying to substitute entire expressions at once.

Practice Problems

1. If f(x) = 2x - 7, find f(4) and f(-3).

Show Solution

f(4) = 2(4) - 7 = 8 - 7 = 1. f(-3) = 2(-3) - 7 = -6 - 7 = -13.

2. Find the domain of h(x) = 1 / (x2 - 9).

Show Solution

The denominator cannot equal zero: x2 - 9 = 0 gives x = 3 or x = -3. Domain: all real numbers except x = 3 and x = -3.

3. Let f(x) = x + 4 and g(x) = 2x. Find f(g(3)) and g(f(3)).

Show Solution

f(g(3)): first g(3) = 2(3) = 6. Then f(6) = 6 + 4 = 10.

g(f(3)): first f(3) = 3 + 4 = 7. Then g(7) = 2(7) = 14.

4. Let f(x) = x2 and g(x) = x - 5. Write a formula for f(g(x)) and g(f(x)).

Show Solution

f(g(x)) = (x - 5)2 = x2 - 10x + 25.

g(f(x)) = x2 - 5 = x2 - 5.

5. If f(x) = 3x + 2, find f(x + h) - f(x) and simplify. (This is related to the difference quotient.)

Show Solution

f(x + h) = 3(x + h) + 2 = 3x + 3h + 2. Then f(x + h) - f(x) = (3x + 3h + 2) - (3x + 2) = 3h.

Summary

Function notation f(x) precisely identifies a function and its input. Evaluating a function means substituting the input value for x everywhere it appears. Domain is the set of allowable inputs; range is the set of resulting outputs. Composition f(g(x)) applies g first, then f to the result -- and the order matters because composition is not commutative. These concepts are foundational for calculus, where functions and their combinations are analyzed in depth.

Overview