What is High School / Foundations

Domain and Range?

The domain is every input a function will accept. The range is every output it can possibly produce. Together they define where a function lives.

Every function has rules about what you can feed into it. You can't take the square root of a negative number (in the reals). You can't divide by zero. The domain is the complete set of all input values \(x\) for which the function is actually defined — the set of "legal" inputs.

The range is what comes out: all the possible output values \(f(x)\) that the function can actually produce for inputs in the domain. Not just what the codomain contains, but what the function actually hits.

Domain
Set of all valid inputs (x-values)
Ask: "For which values of x is f(x) defined?" Exclude values that cause division by zero, negatives under square roots, etc.
Range
Set of all actual outputs (y-values)
Ask: "What y-values can f(x) actually produce?" Look at the graph horizontally — which y-values does the curve reach?
🎰
A vending machine analogy

The domain is the list of valid button codes — A1 through D5. Not every button exists; some are blank. The range is the list of actual snacks stocked in the machine — what you can actually get out. The machine won't accept invalid codes (outside the domain), and it can only dispense what's loaded (the range).

📊
Reading domain and range from a graph

Domain: project the curve onto the x-axis — every x-value the curve covers is in the domain.
Range: project the curve onto the y-axis — every y-value the curve reaches is in the range. Gaps in the projection mean gaps in domain or range.

f(x) = √x — Domain: [0, ∞) · Range: [0, ∞)
FunctionDomainRange
\(f(x) = x^2\)\((-\infty, \infty)\)\([0, \infty)\)
\(f(x) = \sqrt{x}\)\([0, \infty)\)\([0, \infty)\)
\(f(x) = \frac{1}{x}\)\(x \neq 0\)\(y \neq 0\)
\(f(x) = \ln x\)\((0, \infty)\)\((-\infty, \infty)\)
\(f(x) = e^x\)\((-\infty, \infty)\)\((0, \infty)\)
\(f(x) = \sin x\)\((-\infty, \infty)\)\([-1, 1]\)
\(f(x) = \frac{1}{\sqrt{x-2}}\)\((2, \infty)\)\((0, \infty)\)

Start with all real numbers and remove anything that breaks the function:

1. Denominators: Set the denominator ≠ 0 and solve. Exclude those values.
2. Even roots: Set the expression inside ≥ 0. Solve the inequality.
3. Logarithms: Set the argument > 0. Solve the inequality.
4. Combinations: Apply all restrictions simultaneously — intersect the allowed sets.

Example — Find the domain of \(f(x) = \dfrac{\sqrt{x-1}}{x-3}\)
Restriction 1 (square root): \(x - 1 \geq 0 \Rightarrow x \geq 1\)
Restriction 2 (denominator): \(x - 3 \neq 0 \Rightarrow x \neq 3\)
Domain: \([1, 3) \cup (3, \infty)\)
✗ Confusing domain with codomain
The codomain is the set of all possible outputs declared by the function's type (e.g. all real numbers). The range is the set of outputs actually achieved. For \(f(x) = x^2\), the codomain might be \(\mathbb{R}\), but the range is only \([0,\infty)\).
✗ Forgetting to exclude endpoints in strict inequalities
\(\sqrt{x}\) has domain \([0,\infty)\) — 0 is included because \(\sqrt{0} = 0\) is fine. But \(\ln x\) has domain \((0,\infty)\) — 0 is excluded because \(\ln 0\) is undefined. Parentheses vs brackets matter.
✗ Reading range incorrectly from the graph
Project onto the y-axis, not the x-axis. A flat section at \(y=3\) means 3 is in the range. A gap between \(y=1\) and \(y=2\) means that interval is not in the range — even if those x-values exist.

Ready to test your knowledge?

Domain and range questions appear throughout BUders quizzes.

Browse All Quizzes →