Functions
| English | Chinese | Pinyin |
|---|---|---|
| function | 函数 | hán shù |
| domain | 定义域 | dìng yì yù |
| range | 值域 | zhí yù |
| inverse function | 反函数 | fǎn hán shù |
| composite function | 复合函数 | fù hé hán shù |
A machine with an input and an output
- A vending machine: you put in a code (input), it gives you a snack (output). A function 函数 works the same way — each input produces exactly one output.
- $f(x) = 3x - 5$ is a function: put in $x = 2$, get out $f(2) = 1$.
Evaluating functions
- $f(x) = 3x - 5$: $\;f(2) = 3(2) - 5 = 1$; $\;f(0) = -5$; $\;f(-1) = -8$.
- The domain 定义域 is the set of allowed inputs. The range 值域 is the set of possible outputs.
$f(x) = \sqrt{x}$ has domain $x \geq 0$ (can't square-root a negative) and range $f(x) \geq 0$.
Functions
y = f(x)
A function turns each input into exactly one output — watch its shape.
For f(x) = 3x − 5, what is f(2)?
f(2) = 3(2) − 5 = 6 − 5 = 1.
For f(x) = x² + 1, what is f(3)?
f(3) = 3² + 1 = 9 + 1 = 10.
Inverse functions 反函数
- The inverse $f^{-1}$ undoes $f$: if $f$ turns $2$ into $1$, then $f^{-1}$ turns $1$ back into $2$.
- Method: write $y = f(x)$, swap $x$ and $y$, then make $y$ the subject.
- $f(x) = 3x - 5$: $y = 3x - 5$, swap: $x = 3y - 5$, solve: $y = \dfrac{x+5}{3}$.
- So $f^{-1}(x) = \dfrac{x+5}{3}$. Check: $f^{-1}(1) = \dfrac{6}{3} = 2$ ✓.
$f^{-1}$ is NOT $f$ to the power $-1$. The notation $f^{-1}(x)$ means "the inverse of $f$", not "$\dfrac{1}{f(x)}$". These are completely different.
The inverse of f(x) = 3x − 5 is f⁻¹(x) = (x + 5)/3. What is f⁻¹(1)?
f⁻¹(1) = (1 + 5)/3 = 6/3 = 2.
To find the inverse of f(x), write y = f(x), swap x and y, then make ______ the subject.
After swapping, solve for y — that gives you f⁻¹(x).
Composite functions 复合函数
- $gf(x)$ means "do $f$ first, then apply $g$ to the result".
- $f(x) = 2x$, $g(x) = x + 3$: $gf(x) = g(2x) = 2x + 3$.
- $fg(x) = f(x+3) = 2(x+3) = 2x + 6$. Order matters!
If f(x) = 2x and g(x) = x + 3, what is gf(x) at x = 5? (gf means do f first)
gf(5) = g(f(5)) = g(10) = 10 + 3 = 13.
For f(x) = 2x and g(x) = x + 3, gf(x) and fg(x) give the same result.
gf(x) = 2x + 3, but fg(x) = 2(x+3) = 2x + 6. The order matters.
Fun fact
- The identity function $I(x) = x$ leaves everything unchanged. For any function, $f \circ f^{-1} = I$ — composing a function with its inverse gives back the original input.

Every curve here is a function: for each input $x$, there's exactly one output $y$.
You've got it
- $f(x) = 3x - 5 \Rightarrow f(2) = 1$; domain = inputs, range = outputs
- inverse $f^{-1}$ undoes $f$: swap $x$ and $y$, then solve for $y$
- composite $gf(x)$ = do $f$ first, then $g$; order matters ($gf \neq fg$)