Domain and Range Explained: How to Find Them for Any Function
Solver AI TeamPublished Updated 10 min read
Domain and range describe every function's inputs and outputs. Learn systematic methods to find them for polynomials, rationals, radicals, and more.
Frequently asked questions
What is the difference between domain and range?
The domain is the set of all input values (x) a function accepts, and the range is the set of all output values (y) it produces. On a graph, the domain is the spread left to right and the range is the spread bottom to top.
How do you find the domain of a function with a fraction?
Set the denominator equal to zero and solve, then exclude those x values, because division by zero is undefined. For f(x) = 1/(x − 3), x cannot be 3, so the domain is all real numbers except 3, written (−∞, 3) ∪ (3, ∞).
How do you find the domain of a square root function?
The expression under the square root must be zero or positive. Solve that inequality. For f(x) = √(x − 4), you need x − 4 ≥ 0, so x ≥ 4 and the domain is [4, ∞). The same rule applies to any even root.
What is the domain of a logarithm?
The input of a logarithm must be strictly positive. For f(x) = ln(x − 2), you need x − 2 > 0, so x > 2 and the domain is (2, ∞). Zero and negative inputs are not allowed, so the graph has a vertical asymptote at x = 2.
When do you use a bracket and when do you use a parenthesis?
Use a bracket when the endpoint is included and a parenthesis when it is not. Infinity always gets a parenthesis. So x ≥ 4 is [4, ∞), while x > 4 is (4, ∞). A hole or a division by zero is excluded with a parenthesis.
Every function takes inputs and produces outputs. The domain is the complete set of input values (x-values) for which the function is defined, while the range is the complete set of output values (y-values) that the function actually produces.
The Key Insight
Think of a function as a machine: the domain is everything you are allowed to feed into the machine, and the range is everything that comes out.
For example, the function f(x) = x² accepts any real number as input, so its domain is all real numbers. However, since squaring any number produces a non-negative result, the range is y ≥ 0.
Understanding domain and range is essential because they tell you the boundaries within which a function operates. Many algebra and calculus problems explicitly ask you to state the domain and range, and many errors in problem-solving come from accidentally using x-values outside the domain.
The Rule — Three Sources of Domain Restrictions
Domain restrictions typically arise from three situations: division by zero, even roots of negative numbers, and logarithms of non-positive numbers. Recognizing these restrictions quickly is the key skill this article will teach you.
Finding the Domain of Polynomials and Rationals
Polynomials
Polynomials are the friendliest functions when it comes to domain. Functions like f(x) = 3x⁴ - 2x + 7 are defined for every real number — there are no fractions, roots, or logarithms to worry about.
The Rule — Polynomial Domain
The domain of any polynomial is always (-∞, ∞).
Rational Functions
Rational functions are fractions where the numerator and denominator are polynomials, such as f(x) = (x + 1) / (x² - 4). The only restriction is that the denominator cannot equal zero, because division by zero is undefined.
Example — Domain of a Rational Function
To find the domain, set the denominator equal to zero and solve: x² - 4 = 0 gives x = 2 and x = -2.
The domain is all real numbers except x = 2 and x = -2.
Answer(-∞, -2) ∪ (-2, 2) ∪ (2, ∞)
Common Mistake
A common mistake is also excluding values that make the numerator zero — but those values are fine; they simply make the function equal zero. The only danger zone is the denominator.
For more complicated rational functions with factorable denominators, always factor completely before identifying the excluded values, because cancellation may create a removable discontinuity (a "hole") rather than a vertical asymptote.
Finding the Domain of Radical and Logarithmic Functions
Radical Functions
Radical functions with even roots (square roots, fourth roots, etc.) require the expression under the radical to be non-negative.
Example 1 — Even Root
For f(x) = √(3x - 6), set the radicand greater than or equal to zero:
3x - 6 ≥ 0, so x ≥ 2.
Domain[2, ∞)
The Key Insight
Note that odd roots (cube roots, fifth roots) accept negative inputs, so g(x) = ∛(x - 1) has domain (-∞, ∞).
Logarithmic Functions
Logarithmic functions require their argument to be strictly positive.
Example 2 — Logarithm
For h(x) = ln(x - 5), set x - 5 > 0, giving x > 5.
Domain(5, ∞)
Combining Restrictions
When functions combine multiple restrictions, you must satisfy all of them simultaneously.
Example 3 — Multiple Restrictions
For example, f(x) = √(x + 2) / (x - 3) requires x + 2 ≥ 0 (so x ≥ -2) and x - 3 ≠ 0 (so x ≠ 3).
Domain[-2, 3) ∪ (3, ∞)
The Takeaway
Always handle each restriction separately first, then take the intersection of the conditions. If you are ever unsure whether you have identified all restrictions, try plugging boundary values into the original function to see if they produce valid outputs.
Finding the Range from Graphs
While domain can usually be found algebraically, the range is often easier to determine by looking at the graph. The range is the set of all y-values that the curve actually reaches. Scan the graph from bottom to top: what is the lowest y-value the function touches, and what is the highest?
Function
Key Feature
Range
f(x) = x²
Vertex at (0, 0), opens upward
[0, ∞)
g(x) = -x² + 4
Vertex at (0, 4), opens downward
(-∞, 4]
h(x) = sin(x)
Wave oscillates between -1 and 1
[-1, 1]
Common Mistake
When reading a graph, pay attention to open versus closed circles at endpoints — an open circle means the function approaches but never reaches that y-value, so you use a parenthesis in interval notation. A filled circle means the value is included, so you use a bracket.
For piecewise functions, examine each piece separately and then combine their ranges. With practice, you can often determine the range by identifying the function type and any transformations applied to the parent function.
Interval Notation vs Set-Builder Notation
There are two standard ways to write domain and range: interval notation and set-builder notation.
Interval Notation
The Rule — Interval Notation
Interval notation uses parentheses for excluded endpoints and brackets for included endpoints. For example, [2, ∞) means all x-values from 2 (included) to infinity. The symbol ∞ always gets a parenthesis because infinity is not a number you can reach.
For domains with gaps, use the union symbol ∪ to join intervals: (-∞, -3) ∪ (-3, ∞) means all real numbers except -3.
Set-Builder Notation
The Rule — Set-Builder Notation
Set-builder notation uses a description: {x | x ≥ 2} reads "the set of all x such that x is greater than or equal to 2." For the same domain with a gap: {x | x ≠ -3}.
Both notations convey the same information, but interval notation is more compact and is preferred in most college-level courses. When writing range, replace x with y: {y | y > 0} or equivalently (0, ∞). Some instructors also accept f(x) > 0 as a range statement.
The Takeaway
Whichever notation your course uses, Solver AI displays both formats when you ask it to find the domain or range, so you can see how to translate between them.
Practice Problems
Problem 1 — Rational Function
Find the domain of f(x) = 1 / (x² - 9).
Solution: Set x² - 9 = 0, so x = ±3.
Domain(-∞, -3) ∪ (-3, 3) ∪ (3, ∞)
Problem 2 — Square Root
Find the domain of g(x) = √(5 - x).
Solution:5 - x ≥ 0 gives x ≤ 5.
Domain(-∞, 5]
Problem 3 — Absolute Value
Find the domain and range of h(x) = |x - 2| + 1.
Solution: The absolute value accepts all inputs, so domain is (-∞, ∞).
The smallest value of |x - 2| is 0 (at x = 2), so the minimum output is 1.
Range[1, ∞)
Problem 4 — Logarithm
Find the domain of k(x) = log₂(x + 4).
Solution:x + 4 > 0 gives x > -4.
Domain(-4, ∞)
Problem 5 — Combined Restrictions
Find the domain of m(x) = √(x) / (x - 1).
Solution: Need x ≥ 0 and x ≠ 1.
Domain[0, 1) ∪ (1, ∞)
The Takeaway
For instant step-by-step domain and range analysis on any function, snap a photo of your problem with Solver AI and it will identify every restriction and express the answer in both notation styles.