Domain & Range

In our previous section, we established that a mathematical function operates like a machine. However, not every number can be fed into every machine, and machines can only produce certain types of outputs. We categorize these valid inputs and possible outputs using two foundational concepts.

The domain is defined as the set of all valid input values (usually $x$-values) for which the function is defined.

The range is the set of all possible output values (usually $y$-values) the function can produce.

Let's investigate the function $f(x) = \left(\frac{1}{x}\right)^2$.


For the domain, we must avoid breaking the fundamental laws of mathematics. Since we can never divide by zero, $x$ cannot be $0$. For the range, notice that any non-zero real number squared becomes strictly positive. Therefore, negative numbers and zero can never be in the range. The domain is $x \ne 0$ and the range is $f(x) > 0$.

To mathematically define these sets, we frequently rely on Set Notation and Interval Notation. Translating between Set Builder Notation and Interval Notation is a crucial skill. Set notation, like $\{x \mid -2 \le x < 5\}$, tells us the exact algebraic condition. Interval notation, like $[-2, 5)$, gives us the exact endpoints.

Visualizing Intervals

Drag the endpoints along the number line. Click on an endpoint to toggle between included (solid) and excluded (open).

Always remember that for any valid coordinate point $(x, y)$ or $(x, f(x))$ on a graph, the $x$-value belongs to the domain of $f$, and the $y$-value belongs to the range of $f$.

The Vertical Line Test

Recall the strict definition of a function: every valid input must produce exactly one output. On a coordinate plane, an input is represented by a specific $x$-coordinate. If an $x$-coordinate connects to more than one $y$-coordinate on the curve, the relationship fails to be a function.

Testing for Functions

Drag the slider to sweep a vertical line across the coordinate plane. Watch what happens when the red vertical line intersects the curve more than once.

Function Not a Function

A direct consequence of the Vertical Line Test is that a function's graph can have at most one $y$-intercept. Since the $y$-axis is a vertical line itself ($x = 0$), crossing it more than once would instantly fail the test. However, you should note that there is absolutely no restriction on the number of $x$-intercepts a function can have.

Notice how the continuous function graphed below oscillates back and forth. It crosses the horizontal axis multiple times, creating infinitely many $x$-intercepts, yet it strictly obeys the Vertical Line Test and crosses the $y$-axis exactly once.

Domain Restrictions

When looking at an algebraic equation, the domain is assumed to be all real numbers $(-\infty, \infty)$ unless a specific operation breaks the rules of mathematics. In Pre-Calculus, your primary job is to hunt for two major red flags:

Testing Restrictions

Drag the numbers into the function machines below. If a number breaks the rules of math, the machine will reject it!

Find the domain of $f(x) = \frac{x+2}{(x-1)(x+4)}$.


Here, we have two factors in the denominator. To ensure we never divide by zero, neither factor can be zero. This means $x - 1 \ne 0 \implies x \ne 1$ and $x + 4 \ne 0 \implies x \ne -4$. The domain excludes both $1$ and $-4$.

Endless Practice

Multiple Choice Free Response

Loading practice engine...


Multiple Choice Free Response

Loading practice engine...


Loading visual practice engine...