Functions: The Language of Calculus
Before derivatives or integrals, you need to master the most fundamental concept in mathematics: the function. Everything in calculus is built on top of it.
What Is a Function?
Informally, a function is a rule that assigns to each input exactly one output. Think of it as a reliable process — the same input always produces the same result.
Function
A function $f$ from a set $A$ to a set $B$ is a rule that assigns to each element $x \in A$ exactly one element $f(x) \in B$.
We write: $f: A \to B$ and we read it as "f maps A to B."
Independent and Dependent Variables
Functions involve two types of variables:
The Input
The variable you freely choose or control. Usually called $x$.
It is independent because its value does not depend on anything else.
The Output
The variable whose value is determined by the input. Usually called $y$ or $f(x)$.
It is dependent because it depends on what $x$ is.
For $y = f(x) = 2x + 1$: you choose $x$ (independent), then $y$ is calculated (dependent).
Pick $x = 3$ → $y = 7$. Pick $x = -1$ → $y = -1$. You control $x$; $y$ responds.
Functions as Ordered Pairs
A function can also be described as a set of ordered pairs $(x, y)$ where each first element (input) appears at most once.
$\{(1, 3),\;(2, 7),\;(4, 3)\}$
Each input (1, 2, 4) appears exactly once. Two inputs sharing the same output (3) is fine.
$\{(2, 5),\;(2, 9),\;(3, 4)\}$
Input $x = 2$ appears twice with different outputs (5 and 9). Not allowed.
Every input has one and only one output.
$x = 2 \;\Rightarrow\; f(2) = 4$ — always.
One input produces two or more outputs.
$x = 4 \;\Rightarrow\; y = 2$ and $y = -2$ — not allowed!
$f(x) = x^2$
For every number $x$ you put in, you get exactly one number out (its square):
$f(3) = 9 \qquad f(-3) = 9 \qquad f(0) = 0 \qquad f(5) = 25$
Note: two different inputs can produce the same output ($f(3) = f(-3) = 9$) and that's perfectly fine — what's NOT allowed is one input giving two different outputs.
The Function Machine
The most intuitive way to think about a function is as a machine: you drop a number in the top, the machine processes it according to its rule, and a (unique) result comes out the other side.
Try different inputs and functions — one input always gives exactly one output.
The machine metaphor makes the uniqueness rule crystal clear: a machine that sometimes gives you a different result for the same input is broken. A function is a deterministic, reliable machine.
Domain and Range
Every function lives between two sets. The set of allowed inputs is the domain, and the set of all possible outputs is the range (also called the image).
Domain of $f$
The set of all input values $x$ for which $f(x)$ is defined. We write it as $\text{Dom}(f)$ or $D_f$.
$D_f = \{x \in \mathbb{R} : f(x) \text{ is defined}\}$
Range of $f$
The set of all output values that $f$ actually produces. We write it as $\text{Range}(f)$ or $\text{Im}(f)$.
$\text{Im}(f) = \{f(x) : x \in D_f\}$
Finding the Domain — Common Restrictions
-
1
Denominators cannot be zero
$f(x) = \dfrac{1}{x-3}$ → exclude $x = 3$ → $D_f = (-\infty, 3) \cup (3, +\infty)$
-
2
Even roots require non-negative radicand
$f(x) = \sqrt{x-2}$ → need $x - 2 \geq 0$ → $D_f = [2, +\infty)$
-
3
Logarithms require positive argument
$f(x) = \ln(x+1)$ → need $x + 1 > 0$ → $D_f = (-1, +\infty)$
-
4
Polynomials have no restrictions
$f(x) = x^3 - 5x + 2$ → defined for all real numbers → $D_f = \mathbb{R} = (-\infty, +\infty)$
| Function | Domain | Range |
|---|---|---|
| $f(x) = x^2$ | $(-\infty, +\infty)$ | $[0, +\infty)$ |
| $f(x) = \sqrt{x}$ | $[0, +\infty)$ | $[0, +\infty)$ |
| $f(x) = \dfrac{1}{x}$ | $(-\infty,0) \cup (0,+\infty)$ | $(-\infty,0) \cup (0,+\infty)$ |
| $f(x) = \sin(x)$ | $(-\infty, +\infty)$ | $[-1, 1]$ |
| $f(x) = e^x$ | $(-\infty, +\infty)$ | $(0, +\infty)$ |
| $f(x) = \ln(x)$ | $(0, +\infty)$ | $(-\infty, +\infty)$ |
The Vertical Line Test
Given a graph, how do you know whether it represents a function? Use the Vertical Line Test: draw (or imagine) vertical lines sweeping across the graph.
A graph represents a function if and only if
every vertical line $x = a$ intersects the graph in at most one point. If any vertical line hits the graph at two or more points, the graph does not represent a function.
Types of Functions
Functions come in many flavors. Here are the most important families you'll encounter in calculus:
Linear
Constant rate of change. Straight line graph. $m$ is the slope.
Quadratic
Parabola. Appears in projectile motion, optimization.
Polynomial
Smooth, continuous everywhere. The simplest functions to work with.
Rational
Ratio of polynomials. May have vertical asymptotes where $q(x)=0$.
Radical
Involves roots. Domain may be restricted to keep the radicand valid.
Exponential
Explosive growth or decay. Models population, radioactive decay, finance.
Logarithmic
Inverse of exponential. Compresses large ranges: decibels, pH, Richter scale.
Trigonometric
Periodic functions. Model waves, oscillations, circular motion.
Piecewise
Different formula on different parts of the domain. Tax brackets, shipping rates.
Functions in the Real World
Functions are everywhere. Any time there's a reliable relationship between two quantities — where one uniquely determines the other — you have a function.
Vending Machine
Each button maps to exactly one product — a perfect function!
Temperature Conversion
$F(C) = \dfrac{9}{5}C + 32$
Projectile Height
$h(t) = -4.9t^2 + v_0 t + h_0$
Compound Interest
$A(t) = P\!\left(1+\dfrac{r}{n}\right)^{nt}$
Sound Intensity
$L(I) = 10\log_{10}\!\left(\dfrac{I}{I_0}\right)$
Population Growth
$P(t) = P_0 \, e^{rt}$
Ohm's Law
$V(I) = I \cdot R$ (R = resistance)
In every real-world function, you can identify: a controlled input (the thing you change or measure), a rule (the formula or process), and a determined output (the result). This input → rule → output structure is the heart of what a function is.
Function Notation & Evaluation
The notation $f(x)$ does not mean "$f$ times $x$." It means "the output of function $f$ when the input is $x$."
Let $f(x) = 3x^2 - 2x + 1$. Evaluate:
$f(0) = 3(0)^2 - 2(0) + 1 = 1$
$f(2) = 3(4) - 4 + 1 = 9$
$f(-1) = 3(1) - 2(-1) + 1 = 3 + 2 + 1 = 6$
$f(a) = 3a^2 - 2a + 1$ (substitute the variable $a$)
$f(x+h) = 3(x+h)^2 - 2(x+h) + 1$ (this appears in the definition of the derivative!)
The expression $\dfrac{f(x+h) - f(x)}{h}$ is called the difference quotient. When you take the limit as $h \to 0$, you get the derivative — the central concept of differential calculus. Everything starts with knowing how to evaluate a function.
Key Takeaways
-
✓
A function maps each input to exactly one output
Same input → same output. Always. No exceptions.
-
✓
The domain is where the function "lives" (inputs)
Find it by excluding values that break the rule (zero denominators, negative radicands, etc.)
-
✓
The range is the set of all possible outputs
It tells you what values $f$ can actually produce.
-
✓
Use the Vertical Line Test on graphs
If any vertical line hits the graph more than once → not a function.
-
✓
Function notation $f(x)$ means evaluation, not multiplication
You substitute the input value everywhere you see $x$ in the formula.