Definition · Domain and rangeThe domain of a function is the set of inputs it is defined on. The range is the set of outputs it produces: every value y for which some x in the domain has f(x) = y. The range is a set of values actually attained, not a set of values that look permitted.
When a function arrives as a bare formula, the domain is not stated and has to be inferred. The convention is the natural domain: every real number for which the formula produces a real value. This is a convention, chosen because it is the largest sensible default, and a problem is free to override it by naming a smaller set.
The two exclusions
- A zero denominator. Division by zero is undefined, so set every denominator equal to zero, solve, and exclude the solutions. For (x + 2)/((x − 2)(x − 3)), the denominator is already displayed as factors, so the excluded inputs are 2 and 3. Producing such a factorisation is Polynomials and Factoring work, not a hidden prerequisite here.
- An even root of a negative. √(2x − 7) needs 2x − 7 ≥ 0, so x ≥ 7/2. Write the exact fraction, not 3.5. Fourth roots, sixth roots and so on behave the same way; cube roots do not: the cube root of −8 is −2, a perfectly real value.
When both appear, both conditions must hold at once. For √(x + 4)/(x − 1) the numerator demands x ≥ −4 and the denominator forbids x = 1, so the domain is [−4, 1) ∪ (1, ∞). Note that −4 is included: √0 = 0 is a perfectly good output. It is the denominator, not the root, that produces an open end.
f(x) = (x + 2)/((x - 2)(x - 3)) bottom is already factored
domain: x =/= 2, x =/= 3
g(x) = sqrt(2x - 7) 2x - 7 >= 0 -> x >= 7/2
h(x) = sqrt(x + 4)/(x - 1) x >= -4 AND x =/= 1
domain: [-4, 1) U (1, inf)
k(x) = sqrt(9 - x^2) 9 - x^2 >= 0 -> -3 <= x <= 3
The last one is worth slowing down for. 9 − x² ≥ 0 is x² ≤ 9, and the inputs whose square is at most 9 are those between −3 and 3 inclusive. Taking a square root of both sides of x² ≤ 9 and writing x ≤ 3 loses the whole left half of the answer; this is the absolute value inequality from “Absolute Value Inequalities” in Linear Equations and Inequalities, in a new costume.
Why the range is harder
The domain is a question about the formula: which inputs does it choke on. The range is a question about the function's behaviour across its whole domain, and there is no equivalent checklist. Three tools cover most cases at this level.
- Use non-negativity, for a square or absolute value. x² ≥ 0, with equality at x = 0, and every non-negative y is (√y)²; the range of x² is [0, ∞). Likewise |x| − 2 has range [−2, ∞).
- Track the outer operation, for a root. √(9 − x²) takes the square root of something running from 0 up to 9, so the outputs run from 0 to 3, giving [0, 3].
- Solve for the input, for a non-horizontal line. If y = 2x − 3, then x = (y + 3)/2 exists for every real y, so the line reaches every real output.
Example · An excluded input removes an output, not its own numberLet q(x) = 2x + 1 with the stated domain x ≠ 3. The formula is a non-horizontal line, so each output comes from exactly one input. Removing x = 3 therefore removes the point (3, 7) and the output 7. The domain excludes 3; the range excludes 7. Copying the input restriction into the range confuses the two axes.
Writing the answer
Interval notation from “Interval and Set-Builder Notation” in Linear Equations and Inequalities, is the expected form. A square bracket includes the endpoint, a round bracket excludes it, and ∞ always takes a round bracket because it is not a number that can be attained. Use ∪ to join the pieces when an excluded point splits the domain, and list the pieces in increasing order.
One habit is worth building: after writing a domain, test a value just inside each end and one value that should be excluded. For [−4, 1) ∪ (1, ∞) try x = −4, which gives 0/(−5) = 0, and x = 1, which divides by zero. Two substitutions confirm both boundary decisions in about ten seconds.