The domain nearly always comes from three quick rules. The range needs a little more thought, but a single idea (solve for and see when a solution exists) handles most cases, including ones where a graph is no help.
What are the domain and range of a function?
A function is a machine: the domain is everything you are allowed to feed in, and the range is everything that can come out. Both are sets of numbers, and both can be finite lists, intervals, or unions of intervals. Any relation has a domain and range, but a function adds the rule that each input produces exactly one output. In function notation, the domain lives inside the parentheses of and the range is the set of values takes.
For a set of ordered pairs, read the first coordinates for the domain and the second coordinates for the range, listing repeats once. The pairs have domain and range . Two inputs sharing an output is perfectly legal. Two outputs for one input is not.
Textbooks sometimes mention a third set, the codomain. It is the set of outputs the function is declared able to produce, while the range is what it truly hits. For declared on the real numbers, the codomain is all reals but the range is only . In algebra and precalculus, “range” means the outputs actually reached.
Quick check
Answer: Domain , range
How do you find the domain of a function from its equation?
Start from the assumption that every real number is allowed, then remove anything that breaks the function. Only three things break real-valued functions at this level:
- A denominator equal to zero.
- A negative number under an even root (square root, fourth root, and so on).
- A zero or negative argument inside a logarithm (see the logarithm rules for why the argument must be positive).
The mental shortcut is to ask “what could go wrong?” rather than “what works?”. Polynomials, odd roots and exponentials have nothing that can go wrong, so their domain is every real number.
When several restrictions appear in one function, solve each one separately and keep only the values that satisfy all of them.
Worked example. Find the domain of .
The root requires a non-negative radicand:
The denominator requires:
Take and remove the single point , which lies inside that ray. The domain is
The point is included: the numerator becomes , and is a perfectly good output.
The trap that costs the most points is simplifying before finding the domain. Restrictions belong to the original expression, so they must be written down first. The hole section below shows exactly how this goes wrong.
How do you write domain and range in interval notation?
Interval notation lists values from smallest to largest. A square bracket means the endpoint is included, and a parenthesis means it is excluded. Since is not a number that can be reached, it always takes a parenthesis: is correct and is not.
The condition means every number except 4, which splits the line into two pieces: . The symbol means "or", joining the pieces.
Set-builder notation says the same thing in a different style: reads “all such that is at least 2.” Some teachers want inequalities, some want intervals, and some want set-builder, so check which one your course expects. All three describe the same set.
For a quick sanity check, sketch a number line. Shade what is allowed, and draw an open circle on every excluded point and a filled one on every included point. Then read the shading left to right, writing one interval for each unbroken stretch. Unions always run in increasing order, so is right and the reverse order is not.
How do you find the range of a function algebraically?

The clean idea behind every range method is this: a number is in the range exactly when the equation has a solution in the domain. So solve for and see which values make that possible. This is also why the range of a function equals the domain of its inverse, and it works even when you cannot picture the graph.
Worked example. Find the range of .
The domain is . Now set and solve for :
A solution for exists for every except . Confirm that truly fails: simplifies to , which is false. The range is . It matches the horizontal asymptote , which is the value the graph approaches but never reaches. The same swap is the first step of finding the inverse of a rational function.
The other quick tools are thinking in layers and plugging in boundary values. For , the root is at least 0, so the whole expression is at least 3. Test a value or two near the edge of the domain to confirm the output behaves as expected. The solve-for- method fails only when cannot be isolated, as with . In that case, graphing is the practical route.
Try this: Find the range of by solving for . Then check your answer against the horizontal asymptote. (Answer: all real numbers except .)
Why does the range of a quadratic stop at the vertex?
Every quadratic can be written as . A square is never negative, so the term has a smallest possible size of , reached at . That makes the output stop at , the vertex height. If the parabola opens up and the range is . If it opens down and the range is .
Worked example. Find the range of .
The vertex has -coordinate
Substitute to get the height:
Since , the parabola opens downward and the range is .
A second method confirms the answer. The equation has a real solution only when its discriminant is non-negative. Here , and gives . The same match appears whichever route is used, which makes it a handy self-check, and it is the reason the quadratic formula is tied to range. Because a parabola is not one-to-one, any inverse needs a restricted domain; see the inverse of a quadratic function.
Quick check
Answer:
How do you read domain and range from a graph?
Picture a light shining straight down onto the -axis: the shadow of the graph is the domain. Now shine it sideways onto the -axis: that shadow is the range. This catches things a quick glance misses, such as a graph that bends back on itself and covers a stretch of values more than once.
- A closed dot means the endpoint is included, so use a bracket.
- An open dot means it is excluded, so use a parenthesis.
- An arrow means the graph continues forever, so use or .
- A gap in the shadow means a union of intervals.
The vertical line test ties in naturally: the domain is exactly the set of values where a vertical line meets the graph at all. For piecewise functions, combine the shadow of each piece, and watch for overlaps. Take for and for . The first piece gives outputs in and the second gives . They overlap on , and their union is every real number, so the range is .
The most common graph error is reading the range off the highest and lowest visible points when arrows show the curve continues. The second is swapping the axes. Domain reads left to right, range reads bottom to top.
What are the domain and range of common parent functions?
Memorizing these few results turns many problems into one-step transformations. Each one follows from the rules above.
| Function | Domain | Range |
|---|---|---|
These are the building blocks in the family of parent functions. When a graph is moved with transformations of functions, the domain shifts with horizontal moves and the range shifts with vertical moves. Take . Shifting right 4 moves the domain to , and shifting up 1 moves the range to . A reflection or stretch changes which direction the range extends, but never the position of a horizontal shift.
Notice the pattern in the table: and have their domain and range swapped. That is not a coincidence, and the last section explains why.
How do holes and real-life limits change domain and range?
Consider . Factor the numerator to get , which cancels to for every . The graph is the line with a hole at . The domain is therefore , even though the simplified line accepts every number. The hole also steals an output: the line would give at , and no other input produces 2, so the range is .
Cancelling a factor hides a restriction but does not remove it. Write the excluded values from the original expression, then simplify.
In applied problems, the domain is whatever the situation permits. A ball launched with height feet only makes sense from launch at until it lands. Setting gives , and the positive solution is seconds. The domain is . The vertex is at , where , so the range is feet. The algebraic parabola would continue to negative times and negative heights, but physics does not.
Counting contexts change the type of set. The number of tickets sold must be a whole number, so the domain is and the graph is separate dots, not a line. State which kind of numbers are allowed before writing any interval.
How do domain and range change with inverses and composition?
An inverse undoes a function, so inputs and outputs trade places: the domain of becomes the range of , and the range of becomes its domain. This explains the swapped pair in the table, since has range and its inverse has domain . A function needs to be one-to-one to have an inverse, and restricting the domain is how to fix one that is not. Restrict to , and the inverse appears with domain and range .
For composition of functions, the domain of has two requirements: must be in the domain of , and must land in the domain of . Forgetting the second requirement is a classic error. With and , the composition simplifies to . Yet the domain is , not all reals, because rejects negative numbers before ever sees them.
A final habit worth building: after writing a domain or range, test one value inside it and one just outside. If the inside value gives a clean output and the outside one breaks or is unreachable, the answer is almost certainly right.
Quick check
Answer:
Practice problems
0 of 5 solved
- Find the domain of .
Answer: , or
The denominator cannot be zero. Solve to get . Every other real number works, so the domain is . - Find the domain of .
Answer:
The radicand must be non-negative: . Add 6 and divide by 3 to get . In interval notation the domain is . - Find the range of .
Answer:
The square root is never negative, so and it reaches 0 at . Adding 3 gives , and the root grows without bound. The range is . - Find the range of .
Answer:
The vertex is at . Then . The parabola opens upward, so the range is . - Find the domain and range of .
Answer: Domain: . Range:
The denominator gives . For the range, set and solve for : , so and . This needs , and never occurs because is false. The range is .
Common questions
What is the difference between domain and range?
The domain is the set of inputs a function accepts, usually the values. The range is the set of outputs it actually produces, usually the values. Domain is read left to right on a graph, range from bottom to top.
What is the domain and range of a constant function?
For the domain is all real numbers, because any can be entered. The range is the single value , since every input gives the same output.
Is the range the same as the codomain?
Not exactly. The codomain is the set of outputs a function is declared to be able to produce, while the range is the set of outputs it really hits. For with codomain all real numbers, the range is only . Most algebra courses use the word range for the outputs actually reached.
How do you write domain and range in interval notation?
Write the values from smallest to largest, using brackets for included endpoints and parentheses for excluded ones. Infinity always gets a parenthesis. Use the union symbol to join separate pieces, such as for .
Can domain and range ever be the same set?
Yes. The line and the function both have equal domain and range ( and respectively). The sets are unrelated in general, so matching is a coincidence of the function, not a rule.
Why does the range exclude the hole in a graph?
A hole means the function is undefined at that , so the value that would sit there is never produced, unless another produces it. For the hole at removes from the range.