Domain and Range: Definition, Method and Examples

MathPublished

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 xx-values that can go into the function. The range is the set of all resulting yy-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.


A mapping diagram showing a domain set with inputs negative 2, 0, and 5 mapping to a range set with outputs 4, 0, and 25.

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.

A two-column table displaying x-values 1, 2, and 3 in the domain column, corresponding to y-values 10, 20, and 30 in the range column.

Write the sets using curly braces. Based on the table, the domain is {1,2,3}\{1, 2, 3\} and the range is {10,20,30}\{10, 20, 30\}. 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.


A coordinate plane showing a continuous line segment from negative 3, negative 2 to 4, 5. The domain is projected onto the x-axis from negative 3 to 4. The range is projected onto the y-axis from negative 2 to 5.

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:

  1. Denominators cannot equal zero: Division by zero is undefined. If the rule is f(x)=1x−4f(x) = \dfrac{1}{x - 4}, the denominator x−4x - 4 cannot be 00. Therefore, 44 is excluded from the domain.
  2. Square roots must be non-negative: Taking the square root of a negative number produces a non-real result. If the rule is f(x)=x+2f(x) = \sqrt{x + 2}, the expression x+2x + 2 must be greater than or equal to 00.

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.

A mapping diagram showing a domain set connecting to a codomain set. The inputs map to only a subset of the codomain, and a dashed border highlights this smaller subset as the true range.

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 {(1,5),(2,7),(3,9)}\{(1, 5), (2, 7), (3, 9)\}?


Method:

  1. Extract the xx-values (first coordinates) to find the domain.
  2. Extract the yy-values (second coordinates) to find the range.

Answer: The domain is {1,2,3}\{1, 2, 3\} and the range is {5,7,9}\{5, 7, 9\}.


Check: Verify that every xx-coordinate is in the domain set and every yy-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 (−2,4)(-2, 4) and ends at (5,8)(5, 8), with closed circles at both ends. What are the domain and range?


Method:

  1. Find the minimum and maximum xx-values (left to right) to determine the domain.
  2. Find the minimum and maximum yy-values (bottom to top) to determine the range.

Answer: The domain is −2≤x≤5-2 \leq x \leq 5 and the range is 4≤y≤84 \leq y \leq 8.


Check: Verify the starting point (−2,4)(-2, 4) provides the minimum bounds and the ending point (5,8)(5, 8) provides the maximum bounds.


Example 3: Finding domain restrictions in a rule


Question: What is the domain of f(x)=5x−3f(x) = \dfrac{5}{x - 3}?


Method:

  1. Identify the restriction type. The denominator of a fraction cannot equal zero.
  2. Set up an expression for the denominator. Write x−3≠0x - 3 \neq 0.
  3. Solve for xx. Adding 33 to both sides gives x≠3x \neq 3.

Answer: The domain is all real numbers except x=3x = 3.


Check: Substitute x=3x = 3 into the function. The denominator becomes 3−3=03 - 3 = 0, which makes the division undefined, confirming that 33 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

Question

A coordinate plane showing a discrete graph with four distinct points positioned at negative 2 comma negative 1, 0 comma 2, 1 comma negative 1, and 3 comma 4.

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

  • {−2,0,1,3}\{-2, 0, 1, 3\}

  • {−1,2,4}\{-1, 2, 4\}

  • {−1,2,−1,4}\{-1, 2, -1, 4\}

  • {−2,−1,0,1,2,3,4}\{-2, -1, 0, 1, 2, 3, 4\}

Answer:

{−1,2,4}\{-1, 2, 4\}

Question

A vertical table defining a function with x-values negative 1, 0, and 1, mapping to identical y-values of 5, 5, and 5 respectively.

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

  • {−1,0,1}\{-1, 0, 1\}

  • {5}\{5\}

  • {−1,0,1,5}\{-1, 0, 1, 5\}

  • {15}\{15\}

Answer:

{5}\{5\}

Question

Which value is excluded from the domain of the function f(x)=7x−5f(x) = \dfrac{7}{x - 5}?

  • 00

  • 77

  • 55

  • −5-5

Answer:

55

Question

A mapping diagram showing a domain set with inputs 10 and 20. Both inputs map to exactly one output, which is 30, inside a larger codomain set containing 30, 40, and 50.

Based on the mapping diagram, which statement is true?

  • The domain is {30,40,50}\{30, 40, 50\}.

  • The range is {30,40,50}\{30, 40, 50\}.

  • The range is {30}\{30\}.

  • The codomain is {30}\{30\}.

Answer:

The range is {30}\{30\}.

Question

A community theater sells up to 5050 tickets for a single play. Let C(n)C(n) be the total cost of purchasing nn tickets, where each ticket is 88 dollars. What is the most reasonable domain for this function?

  • All real numbers between 00 and 5050.

  • The whole numbers from 00 to 5050.

  • All whole numbers greater than or equal to 00.

  • The whole numbers from 00 to 400400.

Answer:

The whole numbers from 00 to 5050.