We've updated our

TEXT

# Domain and Range

### 4.3 Learning Objectives

• Find the domain of a square root and rational function
• Find the domain and range of a function from the algebraic form.
• Define the domain of linear, quadratic, radical, and rational functions from graphs
Functions are a correspondence between two sets, called the domain and the range. When defining a function, you usually state what kind of numbers the domain (x) and range (f(x)) values can be. But even if you say they are real numbers, that doesn’t mean that all real numbers can be used for x. It also doesn’t mean that all real numbers can be function values, f(x). There may be restrictions on the domain and range. The restrictions partly depend on the type of function. In this topic, all functions will be restricted to real number values. That is, only real numbers can be used in the domain, and only real numbers can be in the range. There are two main reasons why domains are restricted.
• You can’t divide by 0.
• You can’t take the square (or other even) root of a negative number, as the result will not be a real number.
In what kind of functions would these two issues occur?
• the function is a rational function and the denominator is 0 for some value or values of x, $f\left(x\right)=\frac{x+1}{2-x}$ is a rational function
• the function is a radical function with an even index (such as a square root), and the radicand can be negative for some value or values of x. $f\left(x\right)=\sqrt{7-x}$ is a radical function
The following table gives examples of domain restrictions for several different rational functions.
Function Notes
$f(x)=\frac{1}{x}$ If $x=0$, you would be dividing by 0, so $x\neq0$.
$f(x)=\frac{2+x}{x-3}$ If $x=3$, you would be dividing by 0, so $x\neq3$.
$f(x)=\frac{2(x-1)}{x-1}$ Although you can simplify this function to $f(x)=2$, when $x=1$ the original function would include division by 0. So $x\neq1$.
$f(x)=\frac{x+1}{{{x}^{2}}-1}$ Both $x=1$ and $x=−1$ would make the denominator 0. Again, this function can be simplified to $f(x)=\frac{1}{x-1}$, but when $x=1$ or $x=−1$ the original function would include division by 0, so $x\neq1$ and $x\neq−1$.
$f(x)=\frac{2(x-1)}{{{x}^{2}}+1}$ This is an example with no domain restrictions, even though there is a variable in the denominator. Since $x^{2}\geq0,x^{2}+1$ can never be 0. The least it can be is 1, so there is no danger of division by 0.
Square roots of negative numbers could happen whenever the function has a variable under a radical with an even root. Look at these examples, and note that “square root of a negative variable” doesn’t necessarily mean that the value under the radical sign is negative! For example, if $x=−4$, then $−x=−(−4)=4$, a positive number.
Function Restrictions to the Domain
$f(x)=\sqrt{x}$ If $x<0$, you would be taking the square root of a negative number, so $x\geq0$.
$f(x)=\sqrt{x+10}$ If $x<−10$, you would be taking the square root of a negative number, so $x\geq−10$.
$f(x)=\sqrt{-x}$ When is $-x$ negative? Only when x is positive. (For example, if $x=−3$, then $−x=3$. If $x=1$, then $−x=−1$.) This means $x\leq0$.
$f(x)=\sqrt{{{x}^{2}}-1}$ $x^{2}–1$ must be positive, $x^{2}–1>0$. So $x^{2}>1$. This happens only when x is greater than 1 or less than $−1$: $x\leq−1$ or $x\geq1$.
$f(x)=\sqrt{{{x}^{2}}+10}$ There are no domain restrictions, even though there is a variable under the radical. Since $x^{2}\ge0$, $x^{2}+10$ can never be negative. The least it can be is $\sqrt{10}$, so there is no danger of taking the square root of a negative number.
So how, exactly do you define the domain of a function anyway?

### How To: Given a function written in equation form, find the domain.

1. Identify the input values.
2. Identify any restrictions on the input and exclude those values from the domain.
3. Write the domain in interval form, if possible.

### Example 4.3.A

Find the domain of the function $f\left(x\right)={x}^{2}-1$.

Answer: The input value, shown by the variable $x$ in the equation, is squared and then the result is lowered by one. Any real number may be squared and then be lowered by one, so there are no restrictions on the domain of this function. The domain is the set of real numbers. In interval form, the domain of $f$ is $\left(-\infty ,\infty \right)$.

### How To: Given a function written in an equation form that includes a fraction, find the domain.

1. Identify the input values.
2. Identify any restrictions on the input. If there is a denominator in the function’s formula, set the denominator equal to zero and solve for $x$ . If the function’s formula contains an even root, set the radicand greater than or equal to 0, and then solve.
3. Write the domain in interval form, making sure to exclude any restricted values from the domain.

### Example 4.3.B

Find the domain of the function $f\left(x\right)=\frac{x+1}{2-x}$.

Answer: When there is a denominator, we want to include only values of the input that do not force the denominator to be zero. So, we will set the denominator equal to 0 and solve for $x$.

$\begin{cases}2-x=0\hfill \\ -x=-2\hfill \\ x=2\hfill \end{cases}$

Now, we will exclude 2 from the domain. The answers are all real numbers where $x<2$ or $x>2$. We can use a symbol known as the union, $\cup$, to combine the two sets. In interval notation, we write the solution: $\left(\mathrm{-\infty },2\right)\cup \left(2,\infty \right)$.
Figure 3
In interval form, the domain of $f$ is $\left(-\infty ,2\right)\cup \left(2,\infty \right)$.

### How To: Given a function written in equation form including an even root, find the domain.

1. Identify the input values.
2. Since there is an even root, exclude any real numbers that result in a negative number in the radicand. Set the radicand greater than or equal to zero and solve for $x$.
3. The solution(s) are the domain of the function. If possible, write the answer in interval form.

### Example 4.3.C

Find the domain of the function $f\left(x\right)=\sqrt{7-x}$.

Answer: When there is an even root in the formula, we exclude any real numbers that result in a negative number in the radicand. Set the radicand greater than or equal to zero and solve for $x$.

$\begin{cases}7-x\ge 0\hfill \\ -x\ge -7\hfill \\ x\le 7\hfill \end{cases}$

Now, we will exclude any number greater than 7 from the domain. The answers are all real numbers less than or equal to $7$, or $\left(-\infty ,7\right]$.

https://www.youtube.com/watch?v=lj_JB8sfyIM&feature=youtu.be There can be functions in which the domain and range do not intersect at all. For example, the function $f\left(x\right)=-\frac{1}{\sqrt{x}}$ has the set of all positive real numbers as its domain but the set of all negative real numbers as its range. As a more extreme example, a function’s inputs and outputs can be completely different categories (for example, names of weekdays as inputs and numbers as outputs, as on an attendance chart), in such cases the domain and range have no elements in common.

## 4.3.1 Find Domain and Range From a Graph

Finding domain and range of different functions is often a matter of asking yourself, what values can this function not have? Pictures make it easier to visualize what domain and range are, so we will show how to define the domain and range of functions given their graphs. What are the domain and range of the real-valued function $f(x)=x+3$? This is a linear function. Remember that linear functions are lines that continue forever in each direction. Any real number can be substituted for x and get a meaningful output. For any real number, you can always find an x value that gives you that number for the output. Unless a linear function is a constant, such as $f(x)=2$, there is no restriction on the range. The domain and range are all real numbers. For the examples that follow, try to figure out the domain and range of the graphs before you look at the answer.

### Example 4.3.D

What are the domain and range of the real-valued function $f(x)=−3x^{2}+6x+1$?

Answer: This is a quadratic function. There are no rational (divide by zero) or radical (negative number under a root) expressions, so there is nothing that will restrict the domain. Any real number can be used for x to get a meaningful output. Because the coefficient of $x^{2}$ is negative, it will open downward. With quadratic functions, remember that there is either a maximum (greatest) value, or a minimum (least) value. In this case, there is a maximum value. The vertex, or high point, is at (1, 4). From the graph, you can see that $f(x)\leq4$.

The domain is all real numbers, and the range is all real numbers f(x) such that $f(x)\leq4$. You can check that the vertex is indeed at (1, 4). Since a quadratic function has two mirror image halves, the line of reflection has to be in the middle of two points with the same y value. The vertex must lie on the line of reflection, because it’s the only point that does not have a mirror image! In the previous example, notice that when $x=2$ and when $x=0$, the function value is 1. (You can verify this by evaluating f(2) and f(0).) That is, both (2, 1) and (0, 1) are on the graph. The line of reflection here is $x=1$, so the vertex must be at the point (1, f(1)). Evaluating f(1) gives $f(1)=4$, so the vertex is at (1, 4).

### Example 4.3.E

What is the domain and range of the real-valued function $f(x)=-2+\sqrt{x+5}$?

Answer: This is a radical function. The domain of a radical function is any x value for which the radicand (the value under the radical sign) is not negative. That means $x+5\geq0$, so $x\geq−5$. Since the square root must always be positive or 0, $\displaystyle \sqrt{x+5}\ge 0$. That means $\displaystyle -2+\sqrt{x+5}\ge -2$.

The domain is all real numbers x where $x\geq−5$, and the range is all real numbers f(x) such that $f(x)\geq−2$.

### Example 4.3.F

What is the domain of the real-valued function $\displaystyle f(x)=\frac{3x}{x+2}$?

Answer: This is a rational function. The domain of a rational function is restricted where the denominator is 0. In this case, $x+2$ is the denominator, and this is 0 only when $x=−2$.

The domain is all real numbers except $−2$

In the following video we show how to define the domain and range of functions from their graphs. https://youtu.be/QAxZEelInJc

## Summary

Division by 0 could happen whenever the function has a variable in the denominator of a rational expression. That is, it’s something to look for in rational functions. Look at these examples, and note that “division by 0” doesn’t necessarily mean that x is 0! Although a function may be given as “real valued,” it may be that the function has restrictions to its domain and range. There may be some real numbers that can’t be part of the domain or part of the range. This is particularly true with rational and radical functions, which can have restrictions to domain, range, or both. Other functions, such as quadratic functions and polynomial functions of even degree, also can have restrictions to their range.