πŸ”’ Private Site

This site is password-protected.

Chapter 3 β€” Functions

Functions are the single most important concept in all of mathematics. They describe relationships between quantities and are the foundation for calculus, statistics, physics, and computer science. This chapter builds from the definition all the way through transformations and inverse functions.


Table of Contents


Glossary β€” Key Terms

Term Meaning
Relation Any set of ordered pairs
Function A relation where each input has exactly one output
Domain The set of all valid inputs ($x$-values)
Range The set of all possible outputs ($y$-values)
Independent Variable The input variable (usually $x$)
Dependent Variable The output variable (usually $y$)
One-to-One Each output comes from exactly one input
Composition Applying one function to the output of another: $(f \circ g)(x) = f(g(x))$
Inverse Function A function that β€œundoes” another: $f^{-1}(f(x)) = x$
Transformation A change to a function’s graph: shift, reflect, stretch, or compress

1 β€” Functions and Function Notation

1.1 What Is a Function?

Definition: A function is a relation that assigns exactly one output to each input.

Formally: $f: A \to B$ means for every $x \in A$, there exists a unique $y \in B$ such that $y = f(x)$.

  • $A$ is the domain (set of inputs)
  • $B$ is the codomain
  • The set of actual outputs is the range (a subset of the codomain)

Is it a function?

Relation Function? Why?
${(1,2), (3,4), (5,6)}$ βœ“ Yes Each input maps to one output
${(1,2), (1,3), (5,6)}$ βœ— No Input $1$ maps to both $2$ and $3$
$y = x^2$ βœ“ Yes Each $x$ gives exactly one $y$
$x = y^2$ βœ— No $x = 4$ gives $y = 2$ and $y = -2$

1.2 Function Notation

Instead of writing $y = x^2 + 3$, we write:

\[f(x) = x^2 + 3\]

Read as β€œ$f$ of $x$.” The letter $f$ names the function. $f(x)$ represents the output when input is $x$.

  • $f(x)$ does not mean $f$ times $x$!
  • Other letters are common: $g(x)$, $h(t)$, $P(n)$, $C(x)$

1.3 Evaluating Functions

To evaluate $f(a)$: Replace every $x$ in the function’s formula with $a$, then simplify.

Given $f(x) = 3x^2 - 2x + 1$, find:

\[f(0) = 3(0)^2 - 2(0) + 1 = 1\] \[f(-2) = 3(-2)^2 - 2(-2) + 1 = 12 + 4 + 1 = 17\] \[f(a+h) = 3(a+h)^2 - 2(a+h) + 1 = 3(a^2 + 2ah + h^2) - 2a - 2h + 1\] \[= 3a^2 + 6ah + 3h^2 - 2a - 2h + 1\]

The Difference Quotient is fundamental for calculus:

\[\frac{f(x+h) - f(x)}{h}\]

For $f(x) = x^2$:

\[\frac{(x+h)^2 - x^2}{h} = \frac{x^2 + 2xh + h^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h\]

As $h \to 0$, this becomes $2x$ β€” the derivative of $x^2$ (a preview of calculus!).


1.4 The Vertical Line Test

Vertical Line Test: A graph represents a function if and only if no vertical line intersects the graph more than once.

Why? A vertical line represents a single $x$-value. If it hits the graph twice, that $x$ maps to two different $y$-values β†’ not a function.

Graph Passes VLT? Function?
Parabola $y = x^2$ βœ“ Yes
Circle $x^2 + y^2 = 1$ βœ— No
Horizontal line $y = 3$ βœ“ Yes
Vertical line $x = 2$ βœ— No

1.5 One-to-One Functions

A function is one-to-one (injective) if different inputs always produce different outputs:

\[f(a) = f(b) \implies a = b\]

Equivalently: no $y$-value is repeated. A one-to-one function passes the Horizontal Line Test.

Function One-to-One? Why?
$f(x) = 2x + 3$ βœ“ Yes Linear (non-horizontal) β€” always one-to-one
$f(x) = x^2$ βœ— No $f(2) = f(-2) = 4$
$f(x) = x^3$ βœ“ Yes Strictly increasing

2 β€” Domain and Range

2.1 Finding the Domain

The domain is the set of all $x$-values for which the function is defined.

Domain restrictions arise from:

Problem Rule Example
Division by zero Denominator $\neq 0$ $f(x) = \frac{1}{x-3}$, domain: $x \neq 3$
Even roots of negatives Radicand $\geq 0$ $f(x) = \sqrt{x-2}$, domain: $x \geq 2$
Logarithms Argument $> 0$ $f(x) = \ln(x+1)$, domain: $x > -1$

If none of these issues exist, the domain is all real numbers $(-\infty, \infty)$.

Find the domain:

$f(x) = \frac{x+1}{x^2-4}$:

$x^2 - 4 \neq 0 \Rightarrow x \neq \pm 2$

Domain: $(-\infty, -2) \cup (-2, 2) \cup (2, \infty)$

$g(x) = \sqrt{5 - 2x}$:

$5 - 2x \geq 0 \Rightarrow x \leq \frac{5}{2}$

Domain: $\left(-\infty, \frac{5}{2}\right]$

$h(x) = \frac{\sqrt{x+3}}{x - 1}$:

Two conditions: $x + 3 \geq 0$ AND $x \neq 1$

$x \geq -3$ and $x \neq 1$

Domain: $[-3, 1) \cup (1, \infty)$


2.2 Finding the Range

The range is the set of all $y$-values that the function actually produces.

Strategies for finding range:

  1. From the graph: Read off the $y$-values the graph covers
  2. Algebraically: Solve for $x$ in terms of $y$ and find which $y$-values are valid
  3. For common functions: Memorize the ranges
Function Domain Range
$f(x) = x^2$ $(-\infty, \infty)$ $[0, \infty)$
$f(x) = \sqrt{x}$ $[0, \infty)$ $[0, \infty)$
$f(x) = \lvert x \rvert$ $(-\infty, \infty)$ $[0, \infty)$
$f(x) = \frac{1}{x}$ $x \neq 0$ $y \neq 0$
$f(x) = x^3$ $(-\infty, \infty)$ $(-\infty, \infty)$

2.3 Piecewise Functions

A piecewise function uses different formulas for different parts of the domain:

\[f(x) = \begin{cases} \text{formula}_1 & \text{if condition}_1 \\ \text{formula}_2 & \text{if condition}_2 \\ \vdots \end{cases}\]

To evaluate: determine which condition the input satisfies, then use that formula.

Given:

\[f(x) = \begin{cases} x^2 & \text{if } x < 0 \\ 2x + 1 & \text{if } x \geq 0 \end{cases}\] \[f(-3) = (-3)^2 = 9 \quad \text{(since } -3 < 0 \text{, use } x^2\text{)}\] \[f(0) = 2(0) + 1 = 1 \quad \text{(since } 0 \geq 0 \text{, use } 2x + 1\text{)}\] \[f(4) = 2(4) + 1 = 9 \quad \text{(since } 4 \geq 0 \text{)}\]

The Greatest Integer (Floor) Function:

\[f(x) = \lfloor x \rfloor = \text{greatest integer less than or equal to } x\] \[\lfloor 3.7 \rfloor = 3, \quad \lfloor -2.3 \rfloor = -3, \quad \lfloor 5 \rfloor = 5\]

This is a step function β€” its graph looks like a staircase.


3 β€” Rates of Change and Behavior of Graphs

3.1 Average Rate of Change

The average rate of change of $f(x)$ from $x = a$ to $x = b$ is the slope of the secant line:

\[\text{Average Rate of Change} = \frac{f(b) - f(a)}{b - a} = \frac{\Delta y}{\Delta x}\]

This tells you how fast the function’s output changes per unit of input, on average, over the interval $[a, b]$.

Find the average rate of change of $f(x) = x^2 - 3x$ from $x = 1$ to $x = 4$:

\[f(1) = 1 - 3 = -2, \quad f(4) = 16 - 12 = 4\] \[\text{Average ROC} = \frac{4 - (-2)}{4 - 1} = \frac{6}{3} = 2\]

Connection: For a linear function $f(x) = mx + b$, the average rate of change between ANY two points is always $m$ (the slope). For nonlinear functions, it depends on the interval chosen.


3.2 Increasing, Decreasing, and Constant Functions

On an interval $(a, b)$:

Behavior Definition What It Looks Like
Increasing $x_1 < x_2 \Rightarrow f(x_1) < f(x_2)$ Graph goes up (left to right)
Decreasing $x_1 < x_2 \Rightarrow f(x_1) > f(x_2)$ Graph goes down (left to right)
Constant $f(x_1) = f(x_2)$ for all $x_1, x_2$ Graph is flat

For $f(x) = x^2$:

  • Decreasing on $(-\infty, 0)$
  • Increasing on $(0, \infty)$

For $f(x) = -x^3$:

  • Decreasing on $(-\infty, \infty)$ β€” always going down

3.3 Local Extrema (Maxima and Minima)

A local maximum occurs at $x = c$ if $f(c)$ is the largest value near $c$.

A local minimum occurs at $x = c$ if $f(c)$ is the smallest value near $c$.

Together, these are called local extrema. They occur where the function changes from increasing to decreasing (max) or from decreasing to increasing (min).

The absolute/global maximum (or minimum) is the largest (or smallest) value over the entire domain.


4 β€” Composition of Functions

4.1 Combining Functions with Arithmetic

Given functions $f$ and $g$:

Operation Definition Domain
$(f + g)(x)$ $f(x) + g(x)$ $\text{dom}(f) \cap \text{dom}(g)$
$(f - g)(x)$ $f(x) - g(x)$ $\text{dom}(f) \cap \text{dom}(g)$
$(f \cdot g)(x)$ $f(x) \cdot g(x)$ $\text{dom}(f) \cap \text{dom}(g)$
$\left(\frac{f}{g}\right)(x)$ $\frac{f(x)}{g(x)}$ $\text{dom}(f) \cap \text{dom}(g), \; g(x) \neq 0$

4.2 Function Composition

Composition feeds the output of one function as input to another:

\[(f \circ g)(x) = f(g(x))\]

Read: β€œ$f$ of $g$ of $x$.” First apply $g$, then apply $f$ to the result.

Order matters! In general, $f \circ g \neq g \circ f$.

Domain of $f \circ g$: All $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$.

Given $f(x) = x^2 + 1$ and $g(x) = 3x - 2$:

\[(f \circ g)(x) = f(g(x)) = f(3x-2) = (3x-2)^2 + 1 = 9x^2 - 12x + 4 + 1 = 9x^2 - 12x + 5\] \[(g \circ f)(x) = g(f(x)) = g(x^2+1) = 3(x^2+1) - 2 = 3x^2 + 3 - 2 = 3x^2 + 1\]

Notice: $f \circ g \neq g \circ f$ βœ“

Decomposition β€” write $h(x) = \sqrt{x^2 + 5}$ as a composition:

Let $g(x) = x^2 + 5$ and $f(x) = \sqrt{x}$.

Then $h(x) = f(g(x)) = \sqrt{x^2 + 5}$ βœ“


5 β€” Transformation of Functions

Transformations let you take a parent function and shift, reflect, stretch, or compress it to create new functions.

Parent functions to know:

Function Graph Shape
$f(x) = x$ Line through origin
$f(x) = x^2$ U-shaped parabola
$f(x) = x^3$ S-shaped curve
$f(x) = \sqrt{x}$ Half-parabola (right)
$f(x) = \lvert x \rvert$ V-shape
$f(x) = \frac{1}{x}$ Hyperbola

5.1 Vertical and Horizontal Shifts

Transformation Equation Effect
Vertical shift up $k$ $y = f(x) + k$ Graph moves up $k$ units
Vertical shift down $k$ $y = f(x) - k$ Graph moves down $k$ units
Horizontal shift right $h$ $y = f(x - h)$ Graph moves right $h$ units
Horizontal shift left $h$ $y = f(x + h)$ Graph moves left $h$ units

⚠️ Horizontal shifts are COUNTERINTUITIVE!

$f(x - 3)$ shifts the graph right (not left!). Think of it as: the input must be $3$ larger to get the same output.

$f(x + 2)$ shifts the graph left (not right!).

Starting with $f(x) = x^2$:

Transformation Equation Vertex
Original $x^2$ $(0, 0)$
Up 3 $x^2 + 3$ $(0, 3)$
Right 2 $(x-2)^2$ $(2, 0)$
Left 1, Down 4 $(x+1)^2 - 4$ $(-1, -4)$

5.2 Reflections

Transformation Equation Effect
Reflect across $x$-axis $y = -f(x)$ Flip upside-down (negate outputs)
Reflect across $y$-axis $y = f(-x)$ Flip left-right (negate inputs)

$f(x) = \sqrt{x}$:

  • $-\sqrt{x}$: reflected over $x$-axis (goes downward)
  • $\sqrt{-x}$: reflected over $y$-axis (defined for $x \leq 0$)

5.3 Stretches and Compressions

Transformation Equation Effect
Vertical stretch by factor $a > 1$ $y = a \cdot f(x)$ Graph is taller
Vertical compression by $0 < a < 1$ $y = a \cdot f(x)$ Graph is shorter
Horizontal compression by factor $b > 1$ $y = f(bx)$ Graph is narrower
Horizontal stretch by $0 < b < 1$ $y = f(bx)$ Graph is wider

Horizontal transformations are always opposite to what you’d expect:

  • $f(2x)$ makes the graph narrower (compressed), not wider
  • $f(\frac{1}{2}x)$ makes the graph wider (stretched), not narrower

5.4 Combining Transformations

The general form combining all transformations:

\[y = a \cdot f(b(x - h)) + k\]
Parameter Effect
$a$ Vertical stretch/compression; if negative, reflects over $x$-axis
$b$ Horizontal stretch/compression; if negative, reflects over $y$-axis
$h$ Horizontal shift (right if positive)
$k$ Vertical shift (up if positive)

Order of operations for graphing:

  1. Horizontal shift (by $h$)
  2. Horizontal stretch/compress (by $\frac{1}{b}$)
  3. Reflect (if $a$ or $b$ is negative)
  4. Vertical stretch/compress (by $ a $)
  5. Vertical shift (by $k$)

Describe all transformations of $y = -2(x + 3)^2 + 5$:

Starting from $y = x^2$:

  1. Shift left 3 units (the $+3$)
  2. Vertical stretch by factor 2
  3. Reflect over $x$-axis (the negative)
  4. Shift up 5 units

Vertex: $(-3, 5)$; opens downward.


5.5 Even and Odd Functions

Type Algebraic Test Symmetry
Even $f(-x) = f(x)$ for all $x$ Symmetric about the $y$-axis
Odd $f(-x) = -f(x)$ for all $x$ Symmetric about the origin
Neither Neither condition holds No special symmetry

Determine even, odd, or neither:

$f(x) = x^4 - 3x^2 + 1$:

$f(-x) = (-x)^4 - 3(-x)^2 + 1 = x^4 - 3x^2 + 1 = f(x)$ β†’ Even βœ“

$g(x) = x^3 - x$:

$g(-x) = (-x)^3 - (-x) = -x^3 + x = -(x^3 - x) = -g(x)$ β†’ Odd βœ“

$h(x) = x^2 + x$:

$h(-x) = x^2 - x \neq h(x)$ and $\neq -h(x)$ β†’ Neither βœ“

Quick patterns:

  • Even functions have only even powers of $x$ (including constants)
  • Odd functions have only odd powers of $x$ (and no constant)
  • Mixing even and odd powers β†’ neither

6 β€” Absolute Value Functions

6.1 Understanding Absolute Value Functions

The absolute value function is defined as:

\[f(x) = |x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}\]

Its graph is a V-shape with vertex at the origin.


6.2 Graphing Absolute Value Functions

The general absolute value function:

\[f(x) = a|x - h| + k\]
  • Vertex at $(h, k)$
  • Opens upward if $a > 0$, downward if $a < 0$
  • Slope of right branch is $a$, slope of left branch is $-a$
**Graph $f(x) = -2 x + 1 + 4$:**
  • Vertex: $(-1, 4)$
  • Opens downward ($a = -2 < 0$)
  • Right branch: slope $-2$
  • Left branch: slope $2$
  • $x$-intercepts: Solve $-2 x+1 + 4 = 0 \Rightarrow x+1 = 2 \Rightarrow x = 1$ or $x = -3$

7 β€” Inverse Functions

7.1 What Is an Inverse Function?

If $f(a) = b$, then $f^{-1}(b) = a$. The inverse function undoes what $f$ does.

Key properties:

\[f^{-1}(f(x)) = x \quad \text{for all } x \text{ in domain of } f\] \[f(f^{-1}(x)) = x \quad \text{for all } x \text{ in domain of } f^{-1}\]

The domain of $f$ = range of $f^{-1}$ and vice versa.

The graph of $f^{-1}$ is the reflection of $f$ across the line $y = x$.

⚠️ $f^{-1}(x)$ does NOT mean $\frac{1}{f(x)}$!

$f^{-1}$ is the inverse function, not the reciprocal. Use context to distinguish.


7.2 Finding Inverse Functions

Steps to find $f^{-1}(x)$:

  1. Replace $f(x)$ with $y$
  2. Swap $x$ and $y$
  3. Solve for $y$
  4. Replace $y$ with $f^{-1}(x)$

Find the inverse of $f(x) = 3x - 7$:

\[y = 3x - 7\] \[x = 3y - 7 \quad \text{(swap)}\] \[x + 7 = 3y\] \[y = \frac{x + 7}{3}\] \[f^{-1}(x) = \frac{x + 7}{3}\]

Verify: $f(f^{-1}(x)) = 3 \cdot \frac{x+7}{3} - 7 = x + 7 - 7 = x$ βœ“

Find the inverse of $f(x) = \frac{2x + 1}{x - 3}$:

\[x = \frac{2y + 1}{y - 3}\] \[x(y - 3) = 2y + 1\] \[xy - 3x = 2y + 1\] \[xy - 2y = 3x + 1\] \[y(x - 2) = 3x + 1\] \[f^{-1}(x) = \frac{3x + 1}{x - 2}\]

7.3 The Horizontal Line Test

A function has an inverse if and only if it is one-to-one (passes the Horizontal Line Test):

No horizontal line intersects the graph more than once.


7.4 Restricting Domains

If a function is not one-to-one, we can restrict its domain to make it one-to-one, and then find the inverse on that restricted domain.

$f(x) = x^2$ is not one-to-one on $(-\infty, \infty)$.

Restrict domain to $[0, \infty)$: now $f$ is one-to-one.

\[f^{-1}(x) = \sqrt{x} \quad \text{(defined for } x \geq 0\text{)}\]

If we restrict to $(-\infty, 0]$: $f^{-1}(x) = -\sqrt{x}$.


Key Takeaways

  1. A function assigns exactly one output to each input β€” verified by the Vertical Line Test
  2. Domain restrictions: no division by zero, no even roots of negatives, no log of non-positives
  3. The average rate of change = slope of the secant line = $\frac{f(b)-f(a)}{b-a}$
  4. Composition $(f \circ g)(x) = f(g(x))$ β€” order matters!
  5. Transformations follow a consistent pattern: $y = a \cdot f(b(x-h)) + k$
  6. Horizontal transformations are always opposite to what you’d expect
  7. Even functions: symmetric about $y$-axis; Odd: symmetric about origin
  8. Inverse functions undo each other: $f^{-1}(f(x)) = x$ β€” found by swapping $x$ and $y$

Practice Questions

Q1. If $f(x) = 2x^2 - 3x + 1$, find the difference quotient $\frac{f(x+h) - f(x)}{h}$.

Answer: $f(x+h) = 2(x+h)^2 - 3(x+h) + 1 = 2x^2 + 4xh + 2h^2 - 3x - 3h + 1$

$f(x+h) - f(x) = 4xh + 2h^2 - 3h = h(4x + 2h - 3)$

\[\frac{f(x+h) - f(x)}{h} = 4x + 2h - 3\]

Q2. Find the domain of $f(x) = \frac{\sqrt{x+4}}{x^2 - 9}$

Answer: Need $x + 4 \geq 0$ (so $x \geq -4$) and $x^2 - 9 \neq 0$ (so $x \neq \pm 3$).

Domain: $[-4, -3) \cup (-3, 3) \cup (3, \infty)$

Q3. If $f(x) = x^2 + 1$ and $g(x) = \sqrt{x}$, find $(f \circ g)(x)$ and $(g \circ f)(x)$.

Answer: $(f \circ g)(x) = f(\sqrt{x}) = (\sqrt{x})^2 + 1 = x + 1$ (domain: $x \geq 0$)

$(g \circ f)(x) = g(x^2 + 1) = \sqrt{x^2 + 1}$ (domain: all reals)

Q4. Is $f(x) = x^5 + x^3 - x$ even, odd, or neither?

Answer: $f(-x) = -x^5 - x^3 + x = -(x^5 + x^3 - x) = -f(x)$ β†’ Odd

Q5. Find the inverse of $f(x) = \frac{x+5}{2x-1}$.

Answer: $x = \frac{y+5}{2y-1}$, so $x(2y-1) = y + 5$, $2xy - x = y + 5$, $2xy - y = x + 5$, $y(2x-1) = x + 5$.

\[f^{-1}(x) = \frac{x + 5}{2x - 1}\]

Interesting β€” this function is its own inverse!


← Back to Algebra & Trigonometry