Domain and Range — Complete Explanation
The domain of a function is the complete set of input values (x-values) for which the function produces a valid real-number output. The range is the complete set of output values (y-values) the function can produce. Together they define the "legal territory" of a function — what goes in and what comes out.
Understanding domain and range is essential before graphing, solving equations, or composing functions. This guide covers how to identify restrictions for every major function type, how to write answers in interval notation, and how domain and range connect to the function's graph.
Definitions and Interval Notation
Domain: The set of all x-values for which f(x) is defined (produces a real number). Written in set notation {x | condition}, inequality notation (x > 3), or interval notation ([3, ∞)).
Range: The set of all y-values f(x) can produce as x varies over the domain.
Interval notation review: Parentheses () = endpoint excluded (open interval). Brackets [] = endpoint included (closed interval). ∞ and −∞ always use parentheses (infinity is not a number, so it's never included). Union symbol ∪ joins two separate intervals.
| Notation | Meaning | Inequality equivalent |
|---|---|---|
| (a, b) | All x strictly between a and b | a < x < b |
| [a, b] | All x from a to b inclusive | a ≤ x ≤ b |
| [a, b) | a included, b excluded | a ≤ x < b |
| (a, ∞) | All x greater than a | x > a |
| [a, ∞) | All x ≥ a | x ≥ a |
| (−∞, b) | All x less than b | x < b |
| (−∞, ∞) | All real numbers | all x |
| (a, b) ∪ (c, d) | Two separate intervals | a < x < b or c < x < d |
Polynomials and Linear Functions
Polynomial functions (including linear and quadratic) have no restrictions — they are defined for every real number.
Domain of any polynomial: (−∞, ∞) — all real numbers.
Range depends on degree:
Linear f(x) = mx + b (m ≠ 0): range = (−∞, ∞) — the line covers every y-value.
Quadratic f(x) = ax² + bx + c: range = [k, ∞) if a > 0 (minimum at vertex), or (−∞, k] if a < 0 (maximum at vertex), where k = c − b²/4a.
Odd-degree polynomials (degree 1, 3, 5, …): range = (−∞, ∞).
Even-degree polynomials (degree 2, 4, …): range has a one-sided bound at the global minimum (a > 0) or maximum (a < 0).
Rational Functions — Excluding Zero Denominators
A rational function is f(x) = P(x)/Q(x) where Q(x) is a polynomial. The domain excludes all x where Q(x) = 0.
Rule: Set the denominator equal to zero. Solve. Exclude those values.
Example 1: f(x) = 1/(x−3). Denominator zero at x = 3. Domain: (−∞, 3) ∪ (3, ∞).
Example 2: f(x) = (x+1)/(x²−4). Denominator x²−4 = 0 at x = ±2. Domain: (−∞,−2) ∪ (−2, 2) ∪ (2, ∞).
Holes vs asymptotes: If a factor cancels between numerator and denominator, the function has a hole (removable discontinuity) at that x-value. If not, it has a vertical asymptote. Either way, that x is excluded from the domain.
Range: For f(x) = 1/(x−a) + b, the range is (−∞, b) ∪ (b, ∞) — the horizontal asymptote y = b is never reached.
Radical (Square Root) Functions — Non-Negative Radicand
For even-indexed roots (√, ⁴√, etc.), the radicand must be ≥ 0 (you cannot take the square root of a negative real number). Odd roots (∛, etc.) have no restriction.
Rule for √(f(x)): Set f(x) ≥ 0. Solve the inequality. The solution is the domain.
Example 1: f(x) = √(x−4). Require x−4 ≥ 0 → x ≥ 4. Domain: [4, ∞). Range: [0, ∞).
Example 2: f(x) = √(9−x²). Require 9−x² ≥ 0 → x² ≤ 9 → −3 ≤ x ≤ 3. Domain: [−3, 3]. Range: [0, 3] (maximum √9 = 3 at x = 0).
Example 3: f(x) = √(2x+6). Require 2x+6 ≥ 0 → x ≥ −3. Domain: [−3, ∞).
Cube root f(x) = ∛x: Domain and range both (−∞, ∞) — cube roots are defined for all reals.
Logarithmic Functions — Positive Argument
The logarithm log(x) or ln(x) is only defined for strictly positive x. The argument must be > 0 (not ≥ 0, since log(0) = −∞, undefined).
Rule for log(f(x)): Set f(x) > 0 (strictly positive). Solve the inequality.
Example 1: f(x) = log(x−2). Require x−2 > 0 → x > 2. Domain: (2, ∞). Range: (−∞, ∞).
Example 2: f(x) = ln(x² − 9). Require x²−9 > 0 → x² > 9 → x < −3 or x > 3. Domain: (−∞,−3) ∪ (3, ∞). Range: (−∞, ∞).
Range of logarithms: log(x) and ln(x) both have range (−∞, ∞) — they output every real number for some positive input.
Domain and Range Reference Table
Quick reference for the most common function types:
| Function | Domain | Range | Restriction |
|---|---|---|---|
| f(x) = polynomial | (−∞, ∞) | Depends (see above) | None |
| f(x) = 1/x | (−∞,0)∪(0,∞) | (−∞,0)∪(0,∞) | x ≠ 0 |
| f(x) = 1/(x−a) | (−∞,a)∪(a,∞) | (−∞,0)∪(0,∞) | x ≠ a |
| f(x) = √x | [0, ∞) | [0, ∞) | x ≥ 0 |
| f(x) = √(x−a) | [a, ∞) | [0, ∞) | x ≥ a |
| f(x) = √(a²−x²) | [−a, a] | [0, a] | −a ≤ x ≤ a |
| f(x) = ∛x | (−∞, ∞) | (−∞, ∞) | None |
| f(x) = log(x) | (0, ∞) | (−∞, ∞) | x > 0 |
| f(x) = log(x−a) | (a, ∞) | (−∞, ∞) | x > a |
| f(x) = eˣ | (−∞, ∞) | (0, ∞) | None |
| f(x) = sin(x) | (−∞, ∞) | [−1, 1] | None |
| f(x) = cos(x) | (−∞, ∞) | [−1, 1] | None |
| f(x) = tan(x) | x ≠ π/2+nπ | (−∞, ∞) | Odd multiples of π/2 |
| f(x) = |x| | (−∞, ∞) | [0, ∞) | None |
| f(x) = x² (quadratic) | (−∞, ∞) | [0, ∞) | None — minimum 0 at x=0 |
Graphical Interpretation — Vertical and Horizontal Line Tests
Reading domain from a graph: Look at the horizontal extent. The domain is the set of x-values for which the graph exists. Gaps (holes, asymptotes) represent excluded points.
Reading range from a graph: Look at the vertical extent. The range is the set of y-values the graph reaches. If the graph has a minimum at y = 2, the range starts at [2.
Vertical line test: A graph represents a function if and only if no vertical line intersects it more than once. This verifies that each x has exactly one y.
Horizontal line test: If no horizontal line intersects the graph more than once, the function is one-to-one (injective) and has an inverse function. The range of f equals the domain of f⁻¹, and vice versa.