Functions

What is a Function?

A function is a special relationship between two quantities where each input (x-value) produces exactly one output (y-value). This is called the vertical line test: if you can draw a vertical line anywhere on the graph and it only touches the graph once, then the relation is a function.

Think of a function as a machine: you put an input in one end, and the machine processes it according to a rule and produces exactly one output.

Function Notation

We write f(x) to denote "f of x," meaning the function f evaluated at x:

f(x) = 2x + 3

This means "the function f takes x, doubles it, and adds 3."

Example 1: Evaluating Functions

If f(x) = 2x + 3, find:

f(2) = 2(2) + 3 = 4 + 3 = 7

f(-1) = 2(-1) + 3 = -2 + 3 = 1

f(0) = 2(0) + 3 = 3

Domain and Range

Domain

The domain is the set of all possible input values (x-values) for which the function is defined.

Common Domain Restrictions

  • Denominators: Cannot be zero → exclude values that make denominator = 0
  • Square roots (even roots): radicand must be ≥ 0
  • Logarithms: argument must be > 0

Example 2: Finding Domain

Find the domain of f(x) = 1/(x - 2)

Denominator cannot be zero: x - 2 ≠ 0

x ≠ 2

Domain = all real numbers except 2, or (-∞, 2) ∪ (2, ∞)

Example 3: Domain with Square Root

Find the domain of f(x) = √(x - 4)

Square root requires: x - 4 ≥ 0

x ≥ 4

Domain = [4, ∞)

Range

The range is the set of all possible output values (y-values) that the function can produce.

Example 4: Finding Range

Find the range of f(x) = x² with domain all real numbers

x² is always ≥ 0

Range = [0, ∞)

Types of Functions

Linear Functions

A linear function has the form f(x) = mx + b, where m is the slope and b is the y-intercept. Its graph is a straight line.

Example 5: Linear Function

f(x) = 3x - 2

Slope = 3, Y-intercept = -2

This line rises 3 units for every 1 unit it runs right, and crosses the y-axis at -2.

Quadratic Functions

A quadratic function has the form f(x) = ax² + bx + c, where a ≠ 0. Its graph is a parabola.

Vertex Form

f(x) = a(x - h)² + k

where (h, k) is the vertex of the parabola.

If a > 0, the parabola opens upward (minimum at vertex)

If a < 0, the parabola opens downward (maximum at vertex)

Example 6: Converting to Vertex Form

Convert f(x) = x² - 6x + 8 to vertex form

Complete the square:

f(x) = (x² - 6x + 9) + 8 - 9

f(x) = (x - 3)² - 1

Vertex = (3, -1)

Polynomial Functions

Polynomial functions are sums of terms of the form axⁿ, where n is a non-negative integer.

Absolute Value Function

f(x) = |x| creates a V-shaped graph

|x| = x if x ≥ 0, or -x if x < 0

Rational Functions

Rational functions are ratios of polynomials: f(x) = P(x)/Q(x)

They have vertical asymptotes where the denominator equals zero.

Function Operations

Arithmetic Operations

Given f(x) and g(x), we can create new functions:

(f + g)(x) = f(x) + g(x)
(f - g)(x) = f(x) - g(x)
(f · g)(x) = f(x) · g(x)
(f/g)(x) = f(x) / g(x)

Example 7: Function Addition

If f(x) = x² and g(x) = 2x + 1, find (f + g)(3)

(f + g)(3) = f(3) + g(3) = 9 + 7 = 16

Or: (f + g)(x) = x² + 2x + 1 = (x + 1)²

(f + g)(3) = (3 + 1)² = 16 ✓

Composition of Functions

Function composition applies one function to the result of another:

(f ∘ g)(x) = f(g(x))

Read as "f composed with g" or "f of g of x"

Example 8: Function Composition

If f(x) = 2x + 3 and g(x) = x², find f(g(2))

Step 1: g(2) = 2² = 4

Step 2: f(4) = 2(4) + 3 = 11

f(g(2)) = 11

Example 9: Finding Composite Functions

If f(x) = 2x + 3 and g(x) = x², find f(g(x))

f(g(x)) = f(x²) = 2(x²) + 3 = 2x² + 3

g(f(x)) = g(2x + 3) = (2x + 3)² = 4x² + 12x + 9

Note: f(g(x)) ≠ g(f(x)) in general!

Inverse Functions

An inverse function f⁻¹(x) "undoes" what f(x) does. If f maps x to y, then f⁻¹ maps y back to x.

f(f⁻¹(x)) = x
f⁻¹(f(x)) = x

The domain and range of f become the range and domain of f⁻¹, respectively.

Example 10: Finding an Inverse Function

Find the inverse of f(x) = (x - 2)/3

Step 1: Write y = (x - 2)/3

Step 2: Swap x and y: x = (y - 2)/3

Step 3: Solve for y:

3x = y - 2

y = 3x + 2

f⁻¹(x) = 3x + 2

Horizontal Line Test

A function has an inverse if and only if it passes the horizontal line test—no horizontal line intersects the graph more than once. This means the function must be one-to-one.

Function Transformations

Transformations shift, stretch, or reflect the graph of a function.

Vertical Transformations

  • y = f(x) + k: Shift up by k (down if k < 0)
  • y = k·f(x): Vertical stretch by factor k (reflect if k < 0)

Horizontal Transformations

  • y = f(x - h): Shift right by h (left if h < 0)
  • y = f(kx): Horizontal compression by factor k (stretch if 0 < k < 1)

Example 11: Transformations

Starting with f(x) = x², describe the transformations for g(x) = 3(x - 2)² + 1

  • (x - 2): Shift right 2 units
  • ³ outside: Vertical stretch by factor 3
  • + 1: Shift up 1 unit

The vertex moves from (0, 0) to (2, 1).

Even and Odd Functions

Even function: f(-x) = f(x) — symmetric about the y-axis

Odd function: f(-x) = -f(x) — symmetric about the origin

Example 12: Even vs Odd

f(x) = x² is even: f(-2) = 4 = f(2)

f(x) = x³ is odd: f(-2) = -8 = -f(2)

f(x) = x² + x is neither: f(-2) = 2 + (-2) = 0, but f(2) = 6

Key Takeaways