# Describing Domain and Range

### {{ 'ml-heading-theory' | message }}

Sometimes it can be helpful to describe or analyze the set of all inputs and outputs for which a function is defined. These quantities are called domain and range, respectively.
Concept

## Domain

The domain, $D,$ is the set of all $x$-values or inputs for which a function is defined. There are two reasons for numbers to be excluded from the domain:

• The number gives a forbidden calculation, such as $\sqrt{\text{-}1}$ or $\frac{2}{0}.$
• The function describes a specific situation. Suppose, for example, $f(x)$ represents the price of $x$ apples. It does not make sense to consider the cost of $\text{-} 5$ apples. Thus, $\text{-} 5$ would not be in the domain of $f(x).$
Concept

## Range

The range, $R,$ is the set of all $y$-values or outputs a function gives. Since $y$ depends on $x,$ the domain determines the range. Some functions can result in positive and negative $y$-values, whereas others cannot. For example, consider $f(x)=2x \quad \text{and} \quad g(x) = x^2.$ For any input value, $f(x)$ will show positive and negative outputs. The range of $f(x)$ is all real numbers. Conversely, $g(x)$ will only yield non-negative outputs, since the square of a number is never negative. Then, the range of $g(x)$ is $y \geq 0.$

Exercise

The table describes the function, $f(x)=y.$

$x$ $y$
$2$ $1$
$4$ $5$
$6$ $8$
$8$ $9$
$10$ $9$

Determine the domain and the range of the function.

Solution

The domain is the set of all $x$-values for which the function is defined. We can find them in the left column. $D: \{2,4,6,8,10\}.$ The range is the set of all $y$-values, and we find them in the right column. Thus, the range of the function is $R: \{1,5,8,9\}.$

Show solution Show solution
Exercise

Use the graph to determine the domain and the range of the function. Solution

Since it's impossible to draw an infinitely large coordinate system, we cannot sketch the entire graph. However, it's reasonable to assume it continues in the same manner beyond the drawn region. In this case, the graph will continue infinitely to the right and infinitely upward. Thus, the domain and the range do not have an upper limit. However, we can determine their lower limits. The graph of the function begins at $x=\text{-}2,$ so the domain includes all numbers greater than or equal to $\text{-}2.$ This is written as $x\geq\text{-}2.$ Similarly, we see that the smallest $y$-value is $0,$ so the range includes all numbers greater than or equal to $0.$ This is written $y \geq 0.$ Thus, the domain and range of $f(x)$ are as shown. \begin{aligned} D & : x\geq\text{-}2 \\ R & : y\geq \phantom{\text{-}}0 \end{aligned}

Show solution Show solution
Exercise

A theater has a square stage, and each side of the stage floor is $5$ meters. A circular rug is to be laid out on the stage floor. Create a function that describes the area of the rug, and determine its domain and range.

Solution

Let's start by making a rough sketch of the situation. We're confined to the stage's measurements because the rug cannot be bigger than the stage. We'll name the radius of the rug $r.$ The area of a circle is given by the formula $A(r)=\pi r^2,$ where $r$ is the radius of the circle. Since radius measures the distance from the circle to its center, the radius of the rug must be greater than $0.$ Additionally, since the length across the entire circle — the diameter — must not be greater than $5$ meters, the maximum value of $r$ is $2.5$ meters. This gives the domain $D:0 To find the range, we determine the minimum and the maximum value of the area using the domain above. If the radius is $0$ meters the area is also $0.$ $A(0)=\pi \cdot 0^2 =0.$ To find the maximum value of the area, we'll substitute $2.5$ for $r.$
$A(r)=\pi r^2$
$A({\color{#0000FF}{2.5}})=\pi\cdot {\color{#0000FF}{2.5}}^2$
$A(2.5)=19.63495\ldots$
$A(2.5)\approx19.6$
The area of the rug can range between $0$ and approximately $19.6$ square meters. Thus, the range is $R: 0< A(r)\leq 19.6.$
Show solution Show solution