Salick Academy

At CSEC a function was a rule. At CAPE it is a rule together with a domain, and most of the marks in this topic come from taking the domain seriously.

Definition and notation

A function f:ABf: A \to B assigns to each element of the domain AA exactly one element of the codomain BB.

f:x2x+3orf(x)=2x+3f: x \mapsto 2x + 3 \qquad \text{or} \qquad f(x) = 2x + 3

The range (or image) is the set of values actually produced. It is a subset of the codomain, and often a proper one.

Domain and range

When a domain is not stated, take the natural domain: every real value for which the rule makes sense. Two things break it:

Division by zero. For f(x)=1x3f(x) = \dfrac{1}{x-3}, the domain is all real xx except x=3x = 3, written {xR:x3}\{x \in \mathbb{R} : x \ne 3\}.

Square roots of negatives. For f(x)=x2f(x) = \sqrt{x-2}, we need x20x - 2 \ge 0, so the domain is x2x \ge 2.

The range takes more thought:

  • f(x)=x2f(x) = x^2 on R\mathbb{R} has range y0y \ge 0, since a square is never negative.
  • f(x)=x2f(x) = \sqrt{x-2} has range y0y \ge 0, since the root sign denotes the non-negative root.
  • f(x)=1x3f(x) = \dfrac{1}{x-3} has range y0y \ne 0, since a fraction with numerator 1 is never zero.

One-to-one and onto

A function is one-to-one (injective) if different inputs always give different outputs — no output is hit twice.

f(x)=x2f(x) = x^2 on R\mathbb{R} is not one-to-one, because f(2)=f(2)=4f(2) = f(-2) = 4.

f(x)=2x+3f(x) = 2x + 3 is one-to-one: if 2a+3=2b+32a + 3 = 2b + 3 then a=ba = b.

A function is onto (surjective) if every element of the codomain is actually reached — the range equals the codomain.

f:RRf: \mathbb{R} \to \mathbb{R} with f(x)=x2f(x) = x^2 is not onto, because no real xx gives 1-1.

A function that is both is a bijection, and bijections are exactly the functions with inverses.

Composite functions

fg(x)fg(x) means apply gg first, then ff: work from the inside out.

With f(x)=2x+3f(x) = 2x + 3 and g(x)=x2g(x) = x^2:

fg(x)=f(x2)=2x2+3fg(x) = f(x^2) = 2x^2 + 3 gf(x)=g(2x+3)=(2x+3)2=4x2+12x+9gf(x) = g(2x+3) = (2x+3)^2 = 4x^2 + 12x + 9

These are different functions, as they usually are.

For fgfg to exist, the range of gg must lie inside the domain of ff. If f(x)=xf(x) = \sqrt{x} and g(x)=x5g(x) = x - 5, then fg(x)=x5fg(x) = \sqrt{x-5} only makes sense for x5x \ge 5 — the composition has narrowed the domain.

Inverse functions

f1f^{-1} undoes ff: if f(a)=bf(a) = b then f1(b)=af^{-1}(b) = a. Equivalently,

ff1(x)=xandf1f(x)=xff^{-1}(x) = x \qquad \text{and} \qquad f^{-1}f(x) = x

An inverse exists only if ff is one-to-one. If two inputs shared an output, the inverse would not know which to return.

Find f1f^{-1} for f(x)=2x+3f(x) = 2x + 3.

y=2x+3x=y32f1(x)=x32y = 2x + 3 \quad \Rightarrow \quad x = \frac{y-3}{2} \quad \Rightarrow \quad f^{-1}(x) = \frac{x-3}{2}

Check: f(5)=13f(5) = 13 and f1(13)=102=5f^{-1}(13) = \dfrac{10}{2} = 5

The order reverses

(fg)1=g1f1(fg)^{-1} = g^{-1}f^{-1}

Undoing a sequence means undoing the steps in reverse: socks then shoes, but shoes off then socks off.

Domain and range swap

The domain of f1f^{-1} is the range of ff, and the range of f1f^{-1} is the domain of ff.

Graphs and restrictions

The graph of y=f1(x)y = f^{-1}(x) is the graph of y=f(x)y = f(x) reflected in the line y=xy = x. Every point (a,b)(a,b) on one becomes (b,a)(b,a) on the other.

This is why y=exy = e^x and y=lnxy = \ln x are mirror images, and why one passes through (0,1)(0,1) while the other passes through (1,0)(1,0).

Restricting the domain

f(x)=x2f(x) = x^2 on R\mathbb{R} has no inverse. Restrict the domain to x0x \ge 0 and it becomes one-to-one, so

f1(x)=x,x0f^{-1}(x) = \sqrt{x}, \qquad x \ge 0

The restriction is not a technicality — it is what makes the inverse exist, and it is why the calculator's x\sqrt{\phantom{x}} key returns only the positive root.