Domain and range are two important concepts when we talk about functions. Depending on domain restrictions, the graph of a function will look different (and may even have an inverse).

So, what is the difference between domain and range of a function? **The domain of a function f(x) is the set of inputs that are “allowed” (so f(x) is defined for each x in the domain). The range of a function f(x) is the set of possible outputs (there is an input “x” in the domain that yields the output “y” in the range so that f(x) = y). Restricting the domain of f(x) may change the range.**

Of course, x values are not repeated for a function, since a given input has only one output. However, y values can be repeated in the range, since two or more inputs can lead to the same output.

In this article, we’ll talk about the difference between domain and range. We’ll also look at some examples of how to find domain and range for various functions, along with how range changes when we restrict the domain.

Let’s get started.

## Domain vs Range Of A Function

Domain is the set of possible inputs for a function, while range is the set of possible outputs for a function. Domain and range are two connected parts of a function, and together they tell us what the graph looks like (and how two variables are related).

The table below compares domain and range at a glance.

Domain | Range |
---|---|

x-values | y-values |

Horizontal Coordinate Axis | Vertical Coordinate Axis |

Input | Output |

Independent Variable | Dependent Variable |

First Value In An Ordered Pair | Second Value In An Ordered Pair |

the domain and range of a function.

### What Is The Domain Of A Function?

For a function f(x), its domain is the set of input values that produce a valid output. That is, for every value of x in the domain, f(x) has a single well-defined value.

The notation we often use is f:A->B, where:

For example, if we have the function f(x) = x^{2} and a domain of A = {0, 1, 2}, then the range is B = {0, 1, 4}.

If we take f(x) = x^{2} with a domain of real numbers, then the range is the set of nonnegative real numbers.

The domain of a function can vary, depending on whether the function is complex-valued, real-valued, or otherwise.

For example, if the function f(x) = √x is real-valued, then it has a domain of nonnegative numbers (x >= 0). The reason is that for any negative x, √x is imaginary.

On the other hand, if the function f(x) = √x is complex-valued, then it has a domain of all real numbers. This is because imaginary outputs are allowed for a complex-valued function.

Note: if both the domain and range are subsets of the real numbers, then f(x) can be graphed on a 2-dimensional coordinate plane.

### What Is The Range Of A Function?

For a function f(x), its range is the entire set of possible output values. That is, for every value of y in the range, there is an x in the domain so that f(x) = y.

The notation we often use is f:A->B, where:

**A is the domain of f(x) (input values)****B is the range of f(x) (output values)**

For example, if we have the function f(x) = x^{2} and a domain of A = {0, 1, 2}, then the range is B = {0, 1, 4} (since f(0) = 0^{2} = 0, f(1) = 1^{2} = 1, and f(2) = 2^{2} = 4).

If we take f(x) = x^{2} with a domain of real numbers, then the range is the set of nonnegative real numbers (since a real number squared is never negative, but can be zero or positive).

The range of a function can vary, depending on whether the function is complex-valued, real-valued, or otherwise.

For example, if the function f(x) = √x is real-valued, then it has a range of nonnegative real numbers (since the domain is x >= 0). The reason is that for any negative x, √x is imaginary.

On the other hand, if the function f(x) = √x is complex-valued, then it has a range of **R**u**I** (real numbers and imaginary numbers). This is because imaginary outputs are allowed for a complex-valued function, and for any imaginary number bi, the input x = -b^{2} will give an output of bi.

Note: if both the domain and range are subsets of the real numbers, then f(x) can be graphed on a 2-dimensional coordinate plane.

## How To Find The Domain & Range Of A Function

To find the domain and range of a function, we start by looking at which x-values are valid as inputs. Then, we use the set of inputs to help us figure out the set of possible outputs.

To find the domain of a real-valued function, take the following steps:

**Look at the denominator and solve for zero. Exclude these values of x from the domain.****Look at the radicand (expression under the radical) of any even root (square root, fourth root, etc.). Exclude any values of x that make the radicand negative from the domain.****Look at the argument of any logarithm. Exclude any values of x that make this argument negative or zero (logarithm can only take positive values as arguments).**

To find the range of a real-valued function, take the following steps:

**First, find the domain of the function (the set of valid input values – see above).****Next, use the domain (inputs) to figure out which outputs are possible and which are impossible (excluded from the range).**

Note: you can also find the inverse of the function f(x) by replacing f(x) with y, solving for x, switching the variables x and y, and replacing y with f^{-1}(x). Then, the domain of f^{-1}(x) is the range of f(x). (However, not all functions are invertible, so this method may not always work).

Let’s look at some examples of how to find the domain and range of various functions.

### Example 1: Finding The Domain & Range (Linear Function)

Consider the real-valued linear function f(x) = 2x – 10. There are no zero denominators, radicals, or logarithms, so the domain is the set of real numbers.

The range is also the set of all real numbers, which we can see as follows. For any real y in the range, we can find the x value that corresponds to it:

**f(x) = y****2x – 10 = y****2x = y + 10****x = (y + 10)/2**

You can see the graph of this function below.

If we restrict the domain to the set of nonnegative real numbers (x >= 0), then the range also changes. We can see this as follows:

**x >= 0**[restricted domain of f(x)]**2x >= 2*0****2x – 10 >= 0 – 10****f(x) >= -10**[f(x) = 2x – 10]**y >= -10**

So, the range is y >= -10 when the domain is restricted to x >= 0 (nonnegative real numbers).

### Example 2: Finding The Domain & Range (Quadratic Function)

Consider the real-valued quadratic function f(x) = x^{2} + 4. There are no zero denominators, radicals, or logarithms, so the domain is the set of real numbers.

The range is the set y >= 4, which we can see as follows. For any real y in the range, we can find the x value that corresponds to it:

**f(x) = y****x**^{2}+ 4 = y**x**^{2}= y – 4**x = √(y – 4)**

Since our domain (x-values) is restricted to real numbers, we must have y – 4 >= 0, or y >= 4 (otherwise, we get the square root of a negative number, which is imaginary).

You can see the graph of this function below.

If we restrict the domain to the set x >= 3, then the range also changes. We can see this as follows:

**x >= 3**[restricted domain of f(x)]**x**^{2}>= 3^{2}**x**[f(x) = x^{2}+ 4 >= 9 + 4^{2}+ 4]**f(x) >= 13****y >= 13**

So, the range is y >= 13 when the domain is restricted to x >= 3.

### Example 3: Finding The Domain & Range (Cubic Function)

Consider the real-valued cubic function f(x) = x^{3} – 8. There are no zero denominators, radicals, or logarithms, so the domain is the set of real numbers.

The range is also the set of all real numbers, which we can see as follows. For any real y in the range, we can find the x value that corresponds to it:

**f(x) = y****x**^{3}– 8 = y**x**^{3}= y + 8**x =**^{3}√(y + 8)

You can see the graph of this function below.

If we restrict the domain to the set x >= 2, then the range also changes. We can see this as follows:

**x >= 2**[restricted domain of f(x)]**x**^{3}>= 2^{3}**x**^{3}– 8 >= 8 – 8**f(x) >= 0****y >= 0**

So, the range is y >= 0 when the domain is restricted to x >= 2.

### Example 4: Finding The Domain & Range (Absolute Value Function)

Consider the real-valued absolute value function f(x) = |3x – 15|. There are no zero denominators, radicals, or logarithms, so the domain is the set of real numbers.

The range is the set of all nonnegative real numbers, which we can see as follows. For any real y in the range, we can find the x value that corresponds to it:

**f(x) = y****|3x – 15| = y****|3x – 15| = |y|**[|y| = y when y >= 0]**3x – 15 = y****3x = y + 15****x = (y + 15)/3**

For any y that is negative, the equation |3x – 15| = y has no solution (since absolute value is never negative).

You can see the graph of this function below.

If we restrict the domain to the set x >= 8, then the range also changes. We can see this as follows:

**x >= 8**[restricted domain of f(x)]**3x >= 3*8****3x – 15 >= 24 – 15****|3x – 15| >= |9|****f(x) >= 9****y >= 9**

So, the range is y >= 9 when the domain is restricted to x >= 8.

### Example 5: Finding The Domain & Range (Rational Function)

Consider the real-valued rational function f(x) = 1 / (x – 1)(x – 2).

First, we find the domain by solving for a zero denominator:

**(x – 1)(x – 2) = 0****x – 1 = 0 OR x – 2 = 0****x = 1 OR x = 2**

So, the domain is the set of all real numbers excluding x = 1 and x = 2, or the set **R – {1, 2}**.

Now, to find the range. For a given real value of y (output), we can try to solve f(x) = y:

**f(x) = y****1 / (x – 1)(x – 2) = y****1 = (x – 1)(x – 2)y****1 = (x**^{2}– 3x + 2)y**0 = (y)x**^{2}+ (– 3y)x + (2y – 1)

This is a quadratic equation of the form ax^{2} + bx + c = 0, with a = y, b = -3y, and c = 2y – 1.

Using the quadratic formula, we get y^{2} + 4y for the discriminant (the expression under the radical). Since we are looking for real values of x, we want y^{2} + 4y >= 0, or y(y + 4) >= 0.

This is only true in two cases:

**y >= 0 and y + 4 >= 0, meaning y >= 0 and y >= -4, or y >= 0****y <= 0 and y + 4 <= 0, meaning y <= 0 and y <= -4, or y <= -4.**

Of course, we must exclude the value y = 0 from the range, since there is no solution for f(x) = 0:

**f(x) = 0****1 / (x – 1)(x – 2) = 0****1 = 0**[no solution]

So, the range is the set y >= 0 or y <= -4.

You can see the graph of f(x) below.

You can learn more about the domain and range of a rational function here.

### Example 6: Finding The Domain & Range (Radical Function)

Consider the real-valued radical function f(x) = ^{4}√(x – 3).

First, we find the domain by solving for a negative radicand:

**x – 3 < 0****x < 3 (these numbers are excluded from the domain, since they result in an even root of a negative number).**

So, the domain is the set of real numbers x >= 3.

At x = 3, we get f(3) = ^{4}√(3 – 3) = 0.

For any x >= 3, we get a positive real number for x – 3. The principal fourth root of this number will be a positive real number, so y >= 0 for any real x >= 3.

So, the range is the set y >= 0.

You can see the graph of f(x) below.

If we restrict the domain to x >= 84, then we get a range as follows:

**x >= 84**[restricted domain]**x – 3 >= 84 – 3**^{4}√(x – 3) >=^{4}√81**f(x) >= 3****y >= 3**

So the range is the set y >= 3 when the domain is restricted to the set x >= 84.

### Example 7: Finding The Domain & Range (Logarithmic Function)

Consider the real-valued logarithmic function f(x) = log_{10}(x – 2). The domain of this function is the set x > 2.

We can see this by solving for a negative or zero argument for the logarithm:

**x – 2 <= 0****x <= 2 (these numbers are excluded from the domain, since they result in a negative argument for a logarithm).**

The range is the set of real numbers, which we can see as follows. For any real y in the range, we can find an input x such that f(x) = y:

**f(x) = y****log**_{10}(x – 2) = y**x – 2 = 10**^{y}**x = 10**^{y}+ 2

You can see the graph of f(x) below.

If we restrict the domain to the set x >= 12, then we get a range as follows:

**x >= 12****x – 2 >= 12 – 2****log**_{10}(x – 2) >= log_{10}(10)**f(x) >= 1****y >= 1**

So the range is the set y >= 1 when the domain is restricted to the set x >= 12.

### Example 8: Finding The Domain & Range (Exponential Function)

Consider the real-valued exponential function f(x) = 2^{x-1}. The domain of this function is the set of real number (there is no zero denominator, radical, or logarithm to contend with).

The range is the set of positive real numbers (y > 0), which we can see as follows. For any real y in the range, we can find an input x such that f(x) = y:

**f(x) = y****2**^{x-1}= y**x – 1 = log**_{2}(y)**x = log**_{2}(y) + 1

The log of y is only defined for y > 0, so this is the range of the function.

You can see the graph of f(x) below.

If we restrict the domain to the set x >= 3, then we get a range as follows:

**x >= 3****x – 1 >= 3 – 1****2**^{x-1}>= 2^{2}**f(x) >= 4****y >= 4**

So the range is the set y >= 4 when the domain is restricted to the set x >= 3.

## Conclusion

Now you know the difference between the domain and range of a function. You also know how to find domain and range for a given function and what to look out for when domain is restricted.

You can learn how to find the domain and range of a polynomial here.

You can find answers to common questions about functions here.

I hope you found this article helpful. If so, please share it with someone who can use the information.

Don’t forget to subscribe to our YouTube channel & get updates on new math videos!