A function is a rule that assigns exactly one output to each input. The set of all possible inputs is called the domain, and the set of all possible outputs is called the range.
Function: $f(x) = x^2$. For every input $x$, there is exactly one output $x^2$.
Not a function: A relation that assigns a person to their birth date. (One person has exactly one birth date, but multiple people can share the same date β actually that is still a function from people to dates. Let's use a better example: a circle $x^2 + y^2 = 1$. For $x=0$, $y$ can be $1$ or $-1$, so it's not a function.)
We write $f(x)$ to denote the value of the function $f$ at the input $x$. For example, if $f(x) = 2x + 3$, then $f(4) = 2(4) + 3 = 11$.
| Concept | Definition | Example |
|---|---|---|
| Domain | All possible input values ($x$) | $f(x)=\sqrt{x}$ has domain $[0,\infty)$ |
| Range | All possible output values ($y$) | $f(x)=x^2$ has range $[0,\infty)$ |
Question: Find the domain and range of $f(x) = \sqrt{x-3}$.
Question: Find the domain of $f(x) = \frac{2x}{x^2 - 4}$.
Solution: The denominator cannot be zero. $x^2 - 4 = (x-2)(x+2) = 0$ when $x = 2$ or $x = -2$. So domain is all real numbers except $2$ and $-2$: $(-\infty, -2) \cup (-2, 2) \cup (2, \infty)$.
The vertical line test is a visual way to determine if a graph represents a function. If any vertical line intersects the graph more than once, then the graph is not a function.
Parabola $y = x^2$: Any vertical line $x = a$ hits the parabola exactly once. So it is a function.
Circle $x^2 + y^2 = 1$: A vertical line $x = 0$ hits the circle at two points: $(0,1)$ and $(0,-1)$. So it is NOT a function.
Interactive graph below. Select a function and see whether it passes the vertical line test:
Find the domain of $f(x) = \frac{1}{x-5}$.
Denominator cannot be zero: $x-5 \neq 0 \Rightarrow x \neq 5$. Domain: $(-\infty, 5) \cup (5, \infty)$.
Find the range of $f(x) = x^2 + 2$.
Since $x^2 \ge 0$, $x^2 + 2 \ge 2$. Range: $[2, \infty)$.
Does the graph of $y = \sin x$ represent a function? Why?
Yes. Any vertical line $x = a$ intersects the sine graph exactly once because sine is a function.
If $f(x) = 3x^2 - 2x + 1$, find $f(2)$ and $f(-1)$.
$f(2) = 3(4) - 2(2) + 1 = 12 - 4 + 1 = 9$.
$f(-1) = 3(1) - 2(-1) + 1 = 3 + 2 + 1 = 6$.