# Domain and Range

## Introduction to Domain and Range

The domain of a function is the set of all possible input values that produce some output value range### Learning Objectives

Define the domain and range of a function### Key Takeaways

#### Key Points

- Given a function $f$, the set$x$values (inputs) is the domain of$f$, and the set$y$values ( outputs ) is the range of$f$.
- The domain of a function $f$is all of the values for which the function is defined. For instance,$\frac{1}{x}$is not defined when$x=0$. Also,$\sqrt{x}$is not defined when$x$is negative.
- To find the domain of a function $f$, you must find the values for which$f$is not defined. So the domain for$\sqrt{x}$is$x \geq 0$.

#### Key Terms

**domain**: The set of all points over which a function is defined.**range**: The set of values the function takes on as output.**function**: A relationship between two quantities, called the input and the output; for each input, there is exactly one output.

### What Is the Domain and Range of a Function?

The*domain*of a function is the set of input values,

$x$

, for which a function is defined. The domain is shown in the left oval in the picture below. The function provides an output value, $f(x)$

, for each member of the domain. The set of values the function outputs is termed the *range*of the function, and those values are shown in the right hand oval in the picture below. A

*function*is the relation that takes the inputs of the domain and output the values in the range. The rule for a function is that for each input there is exactly one output.

We can also tell by the set of ordered pairs given in this mapping that it is a function because none of the

$x$

-values repeat: $(-1,1),(1,1),(7,49),(0.5,0.25)$

; since each input maps to exactly one output. (Note that although the output value of $1$

repeats, only the input values can not repeat)We can also tell this mapping, and set of ordered pairs is a function based on the graph of the ordered pairs because the points do not make a vertical line. If an

$x$

value were to repeat there would be two points making a graph of a vertical line, which would not be a function. Let's look at this mapping and list of ordered pairs graphed on a Cartesian Plane.$f(x)=x^{2}$

is the set of all real numbers, $\mathbb{R}$

, as every real number you put into $f$

will give an output, namely $x^2$

.
It is important to note that not all functions have the set of real numbers as their domain. For instance, the function $f(x) = \frac{1}{x}$

is not defined for $x=0$

, because you cannot divide a number by $0$

. In this case, the domain of $f$

is the set of all real numbers *except*

$0$

. That is, $x\neq0$

. So the domain of this function is $\mathbb{R}-\{0\}$

.What about the function

$f(x)=\sqrt{x}$

? In this case, the square root of a negative number is not defined, and so the domain is the set of all real numbers where $x\geq0$

.### Finding the Domain and Range: Given a Function

In order to find the domain of a function, if it isn't stated to begin with, we need to look at the function definition to determine what values are not allowed. For instance, we know that you cannot take the square root of a negative number, and you cannot divide by$0$

. With this knowledge in hand, let's find the domain of a function.Example 1: Find the domain of:

$\displaystyle
f(x)=\frac{1}{\sqrt{x-1}-2}+x$

First, we know we cannot divide by

$0$

, so any value of $x$

that causes a division by $0$

is not allowed in the domain. In this example, this occurs when:$\displaystyle
\sqrt{x-1}-2=0$

Solving for

$x$

, this happens when $x=5$

, so we know that $x\neq5$

.We also know we can't take the square root of a negative number. This means that:

$\displaystyle
x-1>0$

After solving for

$x$

, we see that $x>1$

. So this function's domain is the set of all real numbers such that $x>1$

and $x\neq5$

.Therefore, to find what values are not in the domain, you must find the values where the function is not defined.

## Visualizing Domain and Range

All values in the domain are mapped onto values in the range that are visualized as graphs of functions### Learning Objectives

Use the graph of a function to determine its domain and range### Key Takeaways

#### Key Points

- Values in the domain map onto values in the range.
- The horizontal and vertical line test can help determine the type of relation between the domain and range.

#### Key Terms

**range**: The set of values (points) which a function can obtain.**domain**: The set of all points over which a function is defined.**function**: Any mathematical formula that produces one and only one result for each input.

### Review of Domain, Range, and Functions

As stated in a previous section, the*domain*of a function is the set of 'input' values

$(x)$

for which the function is defined. The domain is part of the definition of a function. For example, the domain of the function $f(x) = \sqrt{x}$

is $x\geq0$

.The

*range*of a function is the set of results, solutions, or ' output ' values

$(y)$

to the equation for a given input. By definition, a function only has one result for each domain. For instance, the function $f(x)=x^{2}$

has a range of $f(x)\geq0$

, because the square of a number always yields a positive result.In taking both domain and range into account, a

*function*is any mathematical formula that produces one and only one result for each input. Hence, every given domain value has one and only one range value as a result, but not necessarily vice versa. In other words, two different values of

$x$

can have the same $y$

-value, but each $y$

-value must be joined with a distinct $x$

-value. This makes sense since results can repeat (the $y$

-values), but inputs cannot (the $x$

-values).### Determining Domain and Range

The domain and range can be visualized using a graph, such as the graph for$f(x)=x^{2}$

, shown below as a red U-shaped curve. The blue N-shaped (inverted) curve is the graph of $f(x)=-\frac{1}{12}x^3$

.Example 1: Determine the domain and range of each graph pictured below:

Both graphs include all real numbers

$x$

as input values, since both graphs continue to the left (negative values) and to the right (positive values) for $x$

(inputs). The curves continue to infinity in both directions; therefore, we say the domain for both graphs is the set of all real numbers, notated as: $\mathbb{R}$

.If we now look at the possible outputs or

$y$

-values, $f(x)$

, (looking up and down the $y$

-axis, notice that the red graph does NOT include $y$

-values that are negative, whereas the blue graph does include both positive and negative values. Therefore, the range for the graph $f(x)=x^{2}$

, is $\mathbb{R}$

except $y< 0$

, or simply stated: $y \geq 0$

. The range for the graph $f(x)=-\frac{1}{12}x^3$

, is $\mathbb{R}$

.## Domains of Rational and Radical Functions

Rational and radical expressions have restrictions on their domains which can be found algebraically or graphically.### Learning Objectives

Calculate the domain of a rational or radical function by finding the values for which it is undefined### Key Takeaways

#### Key Points

- A rational expression is the quotient of two polynomials. It can be expressed as $\displaystyle \frac{P(x)}{Q(x)}$.
- A rational expression's domain is set such that the denominator cannot equal zero. Therefore, given $\displaystyle \frac{P(x)}{Q(x)}$,$Q(x)\neq 0$.
- To determine the domain of a rational expression, set the denominator equal to zero, then solve for $x$. All values of$x$except for those that satisfy$Q(x)=0$are the domain of the expression.
- A radical expression, is expressed as $\sqrt x$and can have other roots other than a square root.
- A radical function is expressed as $f(x)=\sqrt x$, (usually just referred to as the "square root function") is a function that maps the set of non-negative real numbers onto itself.
- To determine the domain of a radical expression, set the radicand equal to zero, then solve for $x$. All values of$x$except for those that satisfy$\sqrt x=0$are the domain of the expression.

#### Key Terms

**radicand**: The number or expression underneath the radical sign.**rational expression**: An expression that can be written as the quotient of two polynomials.

### Finding Domains of Rational Functions

A*rational expression*is one which can be written as the ratio of two polynomial functions. Despite being called a rational expression, neither the coefficients of the polynomials nor the values taken by the function are necessarily rational numbers. In the case of one variable,

$x$

, an expression is called rational if and only if it can be written in the form:$\displaystyle
\frac { P(x) }{ Q(x) }$

where

$P(x)$

and $Q(x)$

are polynomial functions in $x$

and $Q(x)$

is not the zero polynomial $(Q(x) \neq 0)$

.The

*domain*of a rational expression of is the set of all points for which the denominator is not zero. If the denominator of the equation becomes equal to zero, the expression is undefined at that point.

### Example 1: What is the domain of the rational function:

$\displaystyle
f(x)= \frac { x^3-2x }{ 2(x^2-5) }$

To find the domain of a rational function, set the denominator equal to zero and solve. All values of

$x$

except for those that satisfy $2(x^2-5)=0$

are the domain of the expression.$\displaystyle
2(x^2-5)=0$

To solve, divide both sides by

$2$

, add $5$

to both sides, and then take the square root of both sides to yield:$\displaystyle
x=\pm \sqrt { 5 }$

.Therefore the domain is the set of all real numbers except the square root of five or negative square root of five.

Notice the graph of the function below. At the values of

$x=\pm \sqrt { 5 }$

(which is approximately $\pm 2.2$

), the graph does not exist.### Example 2: What is the domain of the rational function:

### $\displaystyle
f(x)= \frac{\left(x^2-2\right)}{x}$

Algebraically, the domain is the set of all real numbers except zero, since the denominator can not equal zero. One way to determine this is to look at it graphically. We can see that the graph is discontinuous at $x=0$

, indicating that the domain is all numbers other than $x=0$

. This makes sense, because at $x=0$

we would have to divide by zero, which is undefined. The lines of the graph get closer and closer to the value $x=0$

, but never touch.### Finding Domains of Radical Functions

The principal square root function$f(x)=\sqrt x$

(usually just referred to as the "square root function") is a function that maps the set of non-negative real numbers onto itself.$(-x)^2$

gives the same value as $x^2$

so the square root of a number $y$

such that $y=x^2$

would be $\sqrt y = \pm x$

). It is important to remember when graphing the roots that negative values of $x$

will not produce real numbers. This will be explained further in the section on imaginary numbers.
To determine the domain of a radical function algebraically, find the values of $x$

for which the radicand is nonnegative (set it equal to $\geq 0$

) and then solve for $x$

. The *radicand*is the number or expression underneath the radical sign. All values of

$x$

except for those that satisfy $\sqrt x \geq 0$

are the domain of the function.### Example 3: What is the domain of the radical function:

### $\displaystyle
f(x) = \sqrt {x-3} +4$

Set the radicand greater than or equal to zero and solve for $x$

to find the restrictions on the domain:$\displaystyle
{x-3} \geq 0$

Therefore

$x \geq 3$

. So, all real number greater than or equal to $3$

is the domain of the function.