Domain and Range of a Function: Definitions and Examples
The domain of a function is the complete set of permitted input values, and the range is the set of output values the function actually produces. You can find them from the function's algebraic rule, table, mapping, or graph while respecting any mathematical or contextual restrictions. Understanding these sets allows you to accurately define the allowed inputs and outputs of any mathematical relationship.
What are domain and range?
The domain and range specify the exact boundaries of a function's inputs and outputs. When working with functions in algebra, the domain is the set of all valid -values that can go into the function. The range is the set of all resulting -values that come out.
The function domain determines the inputs, and the function range determines the outputs.
You can visualize this process using a mapping diagram. The function maps each element from the domain set to exactly one element in the range set.

Every function must have a domain. While simple mathematical relationships often assume the domain is all real numbers, more complex relationships require you to explicitly state the permitted inputs.
Read domain and range from a table
When data is organized in input output tables, finding the domain and range requires you to separate the two columns of data. The left column lists the discrete domain values, and the right column lists the discrete range values.

Write the sets using curly braces. Based on the table, the domain is and the range is . If a value repeats in the table, write it only once in the final set.
Read domain and range from a graph
When a function is graphed on a coordinate plane, the domain spans horizontally and the range spans vertically. You can find the domain by looking at how far the graph extends from left to right, and you can find the range by looking at how far it extends from bottom to top.

Pay attention to the endpoints of the graph. A solid, closed circle means the coordinate is included in the set, while an open circle means the coordinate is excluded. Continuous graphs are described using inequalities rather than lists of distinct numbers.
Use a rule to identify restrictions
When a rule is written using function notation, you must check if any inputs cause mathematical errors. Basic linear equations typically accept any real number as an input, but rational functions and square root functions often contain restrictions.
Two common restrictions determine a function's domain:
- Denominators cannot equal zero: Division by zero is undefined. If the rule is , the denominator cannot be . Therefore, is excluded from the domain.
- Square roots must be non-negative: Taking the square root of a negative number produces a non-real result. If the rule is , the expression must be greater than or equal to .
Domain range and codomain
The codomain is the complete set of values that could possibly come out of a function, established as part of the function's formal definition. The range is the set of values that actually do come out.

The range is always a subset of the codomain. In many basic functions, the codomain is assumed to be all real numbers, so determining the actual output range becomes the more important task.
Worked examples
Review these examples to see how to find the domain and range from different representations.
Example 1: Finding domain and range from ordered pairs
Question: What are the domain and range of the relation ?
Method:
- Extract the -values (first coordinates) to find the domain.
- Extract the -values (second coordinates) to find the range.
Answer: The domain is and the range is .
Check: Verify that every -coordinate is in the domain set and every -coordinate is in the range set.
Example 2: Identifying continuous intervals on a graph
Question: A continuous line segment on a coordinate graph starts at and ends at , with closed circles at both ends. What are the domain and range?
Method:
- Find the minimum and maximum -values (left to right) to determine the domain.
- Find the minimum and maximum -values (bottom to top) to determine the range.
Answer: The domain is and the range is .
Check: Verify the starting point provides the minimum bounds and the ending point provides the maximum bounds.
Example 3: Finding domain restrictions in a rule
Question: What is the domain of ?
Method:
- Identify the restriction type. The denominator of a fraction cannot equal zero.
- Set up an expression for the denominator. Write .
- Solve for . Adding to both sides gives .
Answer: The domain is all real numbers except .
Check: Substitute into the function. The denominator becomes , which makes the division undefined, confirming that must be excluded.
Common mistakes
Learners frequently misinterpret boundaries and definitions when working with function properties. Use this table to understand the correct mathematical principles.
Incorrect Assumption | Correct Mathematical Principle |
Assuming the range is always identical to the codomain. | The range includes only the actual outputs produced, which is a subset of the codomain's possible outputs. |
Believing the domain is automatically the entire horizontal axis. | The domain depends entirely on the specific plotted curve or points, which may not span the entire axis. |
Ignoring mathematical restrictions when reading an algebraic rule. | Many rules, such as those with denominators or square roots, restrict the domain to avoid undefined values. |
Frequently asked questions
Can the range contain more elements than the domain?
No. A fundamental rule of functions is that each input maps to exactly one output. Because one input cannot produce multiple distinct outputs, the number of actual outputs in the range can never exceed the number of inputs in the domain.
Do all mathematical functions have restrictions?
No. Basic polynomial functions, such as linear and quadratic equations, generally accept any real number as an input without producing an undefined result. You only need to look for restrictions when operations like division by variables or even roots are present.
Practice questions

What is the range of the function shown in the graph?

What is the range of the function shown in the table?
Which value is excluded from the domain of the function ?

Based on the mapping diagram, which statement is true?
The domain is .
The range is .
The range is .
The codomain is .
The range is .
A community theater sells up to tickets for a single play. Let be the total cost of purchasing tickets, where each ticket is dollars. What is the most reasonable domain for this function?
All real numbers between and .
The whole numbers from to .
All whole numbers greater than or equal to .
The whole numbers from to .
The whole numbers from to .
