Functions, Graphs and Lines

Starter ≈ 45 min Chapter 1 8 exercises
Why this mattersEverything in calculus — limits, derivatives, integrals — is just functions in disguise. If you can read a graph, undo a function, and chain two functions together, the rest of the course has solid ground under its feet. This chapter is that ground.

1 · What a function actually is

A function is a machine with one iron rule: each input gives exactly one output. Feed it x, it hands back f(x) — always the same answer for the same x, never two different ones.

The set of inputs we are allowed to feed the machine is the domain. The set of outputs it can produce is the range.

Interval notation, in one breath

[a, b] includes the endpoints, (a, b) excludes them, [a, ∞) runs forever to the right. The symbol ∪ means "union — either of these sets", and ∞ always gets a round bracket because you can never actually arrive there.

Worked example Example 1 — Find the domain of f(x) = √(x − 2).
Step 1: the square root of a negative number is not a real number, so we need x − 2 ≥ 0.
Step 2: solve the inequality: x ≥ 2.
Therefore the domain is [2, ∞). At exactly x = 2 the output is 0 — perfectly legal, so the bracket is square.

2 · Reading graphs like a detective

A graph is a picture of all the input–output pairs at once. Three interrogation techniques:

  • Vertical line test — slide a vertical line across the graph. If it ever stabs two points, it is not a function. One hit per vertical line = legitimate function.
  • Range from a graph — squash the graph flat against the y-axis and look at the shadow. The vertical extent of that shadow is the range.
  • Intercepts — where the graph breaks the x-axis (outputs of 0) and the y-axis (the output at x = 0).

3 · Inverse functions — running the machine backwards

If f sends 4 → 9, the inverse f⁻¹ sends 9 → 4. Two functions are inverses when each one undoes the other: f(f⁻¹(x)) = x and f⁻¹(f(x)) = x.

The recipe: write y = f(x), swap x and y, solve for y. Done.

Watch outf⁻¹(x) is not 1/f(x)! The ⁻¹ is about undoing, not reciprocating. The reciprocal of f(x) is written [f(x)]⁻¹ or 1/f(x).

A function only has an inverse when it is one-to-one — no output is produced by two different inputs. Test it with the horizontal line test: a horizontal line must not hit the graph twice. (This is also exactly the vertical line test applied to the inverse's graph.)

Restricting the domain. f(x) = x² fails the horizontal line test, so it has no inverse as-is. But on [0, ∞) it passes, and then f⁻¹(x) = √x. Domain restriction is not a hack — it is the definition of arcsin, arccos and friends later in the course.

Worked example Example 2 — Find the inverse of f(x) = 2x + 6.
Step 1: write y = 2x + 6.
Step 2: swap: x = 2y + 6.
Step 3: solve: 2y = x − 6, so f⁻¹(x) = (x − 6)/2.
Sanity check: f(−3) = 0 and f⁻¹(0) = −3. ✓

4 · Composition — machines plugged into machines

(f ∘ g)(x) means f(g(x)) — do g first, then feed its output into f. Order matters: generally f(g(x)) ≠ g(f(x)).

Worked example Example 3 — g(x) = x², h(x) = x + 3. Find g(h(2)).
Step 1: work from the inside out. h(2) = 2 + 3 = 5.
Step 2: feed that into g. g(5) = 5² = 25.
Compare: h(g(2)) = h(4) = 7. Different — that is why notation like f ∘ g exists.

5 · Odd and even — symmetry shortcuts

Check f(−x):

  • Even — f(−x) = f(x). Mirror symmetry across the y-axis. (cos x, x², |x|)
  • Odd — f(−x) = −f(x). Rotational symmetry about the origin. (sin x, x³, x)
  • Neither — everything else. (x² + x)

Why we care: odd/even functions make integrals over symmetric intervals vanish or double — a trick you will use for years.

6 · Linear functions — the heroes of calculus

A linear function f(x) = mx + b has the same slope everywhere: m = rise / run. Every derivative in this course generalizes what the slope of a line does for triangles — the derivative is "slope of the tangent line", made rigorous.

Two points determine a line: given (x₁, y₁) and (x₂, y₂), the slope is m = (y₂ − y₁)/(x₂ − x₁). Through (1, 2) and (3, 8): m = 6/2 = 3.

7 · The standard cast of graphs

You should recognize these on sight: y = x, y = x², y = x³, y = √x, y = |x|, y = 1/x, y = 2ˣ, y = ln x, y = sin x. Calculus questions are ninety-percent "do you recognize the graph" and ten-percent "algebra the graph".

Chapter formula sheet f(f⁻¹(x)) = x and f⁻¹(f(x)) = x
m = (y₂ − y₁)/(x₂ − x₁)
(f ∘ g)(x) = f(g(x))
Inverse recipe: y = f(x) → swap → solve for y
Vertical line test ⇒ function · Horizontal line test ⇒ inverse exists
Even: f(−x) = f(x) · Odd: f(−x) = −f(x) · Domain first, always

Common mistakes

  • Forgetting ∞ always wears parentheses: (−∞, 3], not [−∞, 3].
  • Writing f⁻¹(x) to mean 1/f(x). Don't.
  • Claiming g has an inverse without restricting its domain (x²!).
  • Composing in the wrong order: f(g(x)) means g first.
  • Reading the range off a graph as "where it starts" — squash it onto the y-axis instead.

✎ Practice — marked instantly

The domain of f(x) = √(x − 2) is:
  • A. x ≥ 2
  • B. all real numbers
  • C. x > 2
  • D. x ≤ 2

Multiple choice · interactive marking is enabled when JavaScript loads.

If f(x) = 3x² − 5, compute f(4).

Numeric answer · interactive marking is enabled when JavaScript loads.

Find the inverse of f(x) = 2x + 6. Write f⁻¹(x) = …

Short answer · interactive marking is enabled when JavaScript loads.

A graph passes the vertical line test when:
  • A. it never crosses the x-axis
  • B. every vertical line meets it at most once
  • C. every horizontal line meets it at most once
  • D. it is always increasing

Multiple choice · interactive marking is enabled when JavaScript loads.

Let g(x) = x² and h(x) = x + 3. Compute g(h(2)).

Numeric answer · interactive marking is enabled when JavaScript loads.

Classify f(x) = x³ − x:
  • A. even
  • B. odd
  • C. neither odd nor even
  • D. both odd and even

Multiple choice · interactive marking is enabled when JavaScript loads.

What is the slope of the line through (1, 2) and (3, 8)?

Numeric answer · interactive marking is enabled when JavaScript loads.

Write the set {x : x > 3 or x ≤ −2} in interval notation.

Short answer · interactive marking is enabled when JavaScript loads.