Sitonce
Country: HK
Show exams for United States Hong Kong
Sign in

Finding the Domain and Range of a Function

Updated 6 min read
Key takeaway

The domain is the set of allowed inputs; the range is the set of outputs a function can produce.

More key points
  • For a formula, remove inputs that make an operation undefined, such as a zero denominator or negative radicand in a real even root.
  • Then determine which outputs the allowed inputs can produce, using the graph, equation, or function’s structure.
On this page9 sections
  1. Start with the real-number domain
  2. Exclude zeros from denominators
  3. Check even roots
  4. Find the range after the domain
  5. Use inverse reasoning for rational functions
  6. Read domain and range from a graph
  7. Translate intervals accurately
  8. A practical checklist
  9. Quick examples

A function takes an input and assigns it exactly one output. Its domain answers, “Which inputs are allowed?” Its range answers, “Which outputs actually occur?” These sets are related but are not interchangeable. A formula can accept many x-values while producing only a restricted group of y-values. For a finite table, list the input and output values. For an equation, analyze the operations. For a graph, read the horizontal and vertical coverage, paying attention to open endpoints, closed endpoints, and arrows.

Start with the real-number domain

Unless a problem states another setting, an algebraic function is usually considered over the real numbers. Ask what could make the expression invalid in that system. A polynomial such as f(x) = 2x² − 3x + 1 has no denominator, even root, or other real-number restriction, so every real number is an allowable input. Its domain is (−∞, ∞). Do not assume that a quadratic has a restricted domain simply because its graph has a minimum or maximum; that feature usually restricts the range instead.

Exclude zeros from denominators

Division by zero is undefined. For a rational function, find where the denominator equals zero and exclude those inputs. In f(x) = 5/(x − 4), solve x − 4 = 0, giving x = 4. Every other real input is allowed, so the domain is (−∞, 4) ∪ (4, ∞). The function never outputs 0 either, because its numerator is the nonzero constant 5. This quick observation also identifies a range restriction for this particular formula.

A factor that cancels still creates a domain restriction in the original expression. For example, (x² − 9)/(x − 3) simplifies to x + 3 only when x ≠ 3. The simplified rule matches the original at allowed inputs, but the original expression is undefined at x = 3. Its graph is the line y = x + 3 with a hole at (3, 6), not a complete line. A cancellation removes a factor from the output calculation; it does not retroactively make division by zero valid.

Check even roots

For a real-valued square root, the radicand must be at least zero. If f(x) = √(x − 2), require x − 2 ≥ 0, so x ≥ 2. The domain is [2, ∞). Equality is allowed because √0 is defined. If the expression were √(x − 2) in a complex-number setting, the analysis would differ; ordinary real-valued function questions use the real-number rule unless they tell you otherwise.

For a quotient involving a square root, combine restrictions. In f(x) = 1/√(x − 2), the radicand must be positive, not merely nonnegative, because the resulting square root is also in a denominator. Thus x − 2 > 0 and the domain is (2, ∞). At x = 2 the radical itself is defined, but the full expression divides by zero. A reliable method is to write every restriction separately and then take their intersection.

Find the range after the domain

The range is not found by repeating the domain restrictions on y. Instead, determine the outputs generated by allowed inputs. For f(x) = x² over all real x, a square cannot be negative, and every nonnegative value is achieved: y = 0 at x = 0, while y = 9 at x = 3 or x = −3. The range is [0, ∞). The domain is all real numbers, yet the range starts at zero.

Completing the square reveals the range of a quadratic in vertex form. For f(x) = (x − 2)² + 5, the squared part is at least zero, so f(x) ≥ 5. The minimum value 5 occurs at x = 2. Therefore the range is [5, ∞). If the squared term has a negative coefficient, the vertex gives a maximum instead: f(x) = −(x + 1)² + 4 has outputs no greater than 4, so its range is (−∞, 4]. The bracket includes the endpoint because the vertex is on the graph.

Use inverse reasoning for rational functions

To find a range from a formula, set y equal to the function and ask which y-values can be produced by some allowed x. For y = 1/(x − 4), y cannot be zero because a fraction with numerator 1 is never zero. Every nonzero y is possible: solving y = 1/(x − 4) gives x = 4 + 1/y, which is valid whenever y ≠ 0. Thus the range is (−∞, 0) ∪ (0, ∞). This method is more reliable than guessing from the denominator restriction alone.

Read domain and range from a graph

For a graph, imagine projecting its points onto the x-axis to see the domain, then onto the y-axis to see the range. A point with an open circle is not included; a filled point is included. An arrow indicates continuation in the direction it points. If a curve begins at a filled point with x = −2 and continues right without ending, its horizontal coverage includes −2 and all larger values: [−2, ∞). If its lowest y-coordinate is 1 and the curve rises from there, its range is [1, ∞).

The vertical-line test addresses whether a graph represents a function: every vertical line must intersect it at no more than one point. It does not find the domain or range by itself. A horizontal-line test can help determine whether a function is one-to-one, but it is not a substitute for reading the graph's y-values. Keep the questions distinct: function status concerns repeated outputs for the same input; domain and range describe the input and output sets.

Translate intervals accurately

  • Use a parenthesis when an endpoint is excluded, as with x < 3: (−∞, 3).
  • Use a bracket when an endpoint is included, as with x ≥ 3: [3, ∞).
  • Always use parentheses with infinity because infinity is not a real endpoint that can be reached.
  • Use a union symbol for separated intervals; a denominator restriction often leaves a hole in an otherwise continuous domain.
  • If the task gives a finite set of inputs, list the actual values rather than inventing all numbers between them.

A practical checklist

First identify what the question asks for: input values or output values. For a formula, list forbidden operations and solve the corresponding inequalities or equations. Intersect the restrictions, retaining equality only where the operation permits it. For a range, analyze the function's possible outputs using its graph, shape, vertex, or an equation solved for x. Finally test boundary values in the original rule and express the set with the correct endpoints. This catches the most common errors: excluding an allowed square-root boundary, keeping a zero-denominator value after cancellation, and assuming the range equals the domain.

Quick examples

  • f(x) = √(9 − x²): require 9 − x² ≥ 0, so −3 ≤ x ≤ 3. The square root produces outputs from 0 through 3, so the domain and range are both [−3, 3] and [0, 3], respectively.
  • g(x) = 1/(x² + 1): the denominator is positive for every real x, so the domain is all real numbers. Since x² + 1 ≥ 1, the reciprocal is positive and at most 1; the range is (0, 1].
  • h(x) = 2x + 7: every real input gives a real output, and solving x = (y − 7)/2 shows every real y can occur. Both sets are all real numbers.

These examples show why a single shortcut does not work for every function. Inspect the actual rule. The domain follows from which inputs the operations allow; the range follows from which outputs the entire function can reach.

Common questions

Can a function have all real numbers as its domain but a restricted range?

Yes. For example, f(x) = x² accepts every real input but never produces a negative output, so its range is [0, ∞).

Does canceling a factor remove the original domain restriction?

No. The original expression remains undefined where its denominator was zero, even if the simplified expression has a value there.

When is zero allowed under a square root?

For a real-valued square root in the numerator or by itself, zero is allowed. If that square root is in a denominator, the radicand must be strictly positive.