From the free course College Algebra on Lykke
3.2 Domain and Range
Key concepts: Domain and range of a function · Interval notation · Inclusive and exclusive endpoints · Finding domain from an equation · Restrictions from denominators · Restrictions from even roots · Domain and range from ordered pairs · Reading domain and range from a graph · Real-world domain restrictions · Piecewise-defined functions
By the end of this section the student can: Find the domain of a function defined by an equation; Graph piecewise-defined functions
3.2 Domain and Range
A function is a rule that accepts certain input values and produces corresponding output values. The domain is the set of permitted inputs, and the range is the set of outputs produced by those inputs. For example, a vending machine may accept only amounts from $0$ through $100$ dollars; those accepted amounts form its domain, while the products available form its range. A function’s equation, graph, or definition tells us which inputs and outputs are possible.
A common misconception is that the domain is always all real numbers. Many functions do accept every real input, but denominators cannot equal zero, and even roots cannot contain negative radicands when we work with real-valued functions. These restrictions determine the domain.
Finding the Domain of a Function Defined by an Equation
The domain of a function is the set of all allowable input values, usually represented by $x$. When a function is given by an equation, begin by identifying the input variable and then determine whether any values make the expression undefined.
For a function defined by an equation, use these rules:
- If the equation has no denominator and no even root, the domain may be all real numbers.
- If the equation has a denominator, exclude every input that makes the denominator equal to zero.
- If the equation has an even root, exclude every input that makes the radicand negative. The radicand is the expression inside the radical.
- Write the remaining values in interval notation when possible.
The denominator rule applies because division by zero is undefined. The even-root rule applies because an even root of a negative real number is not a real number. Odd roots, such as cube roots, do not create this restriction because odd roots are defined for every real number.
Example: A Function with a Denominator
Find the domain of
$$ f(x)=\frac{x+1}{2-x}. $$
The numerator may equal zero without causing a problem. The restriction comes from the denominator, so set the denominator equal to zero:
$$ 2-x=0 $$
Subtract $2$ from both sides:
$$ -x=-2 $$
Multiply both sides by $-1$:
$$ x=2 $$
Thus, $x=2$ is not allowed. Every real number less than $2$ and every real number greater than $2$ is permitted. Therefore, the domain is
$$ (-\infty,2)\cup(2,\infty). $$
The parentheses at $2$ indicate that $2$ is excluded. The parentheses at infinity are required because infinity is not a real endpoint that can be included.
Example: A Function with an Even Root
Find the domain of
$$ g(x)=\sqrt{3x-6}. $$
Because the index of the radical is $2$, the radicand must be nonnegative:
$$ 3x-6\geq 0 $$
Add $6$ to both sides:
$$ 3x\geq 6 $$
Divide both sides by $3$:
$$ x\geq 2 $$
Therefore, the domain is
$$ [2,\infty). $$
The bracket at $2$ means that $2$ is included. Indeed,
$$ g(2)=\sqrt{3(2)-6}=\sqrt{6-6}=\sqrt{0}=0, $$
so the function is defined at $x=2$.
Using Notations to Specify Domain and Range
A domain or range can be written as a set of values, as a verbal description, or in interval notation. Interval notation describes every number between two endpoints without listing the numbers individually.
In interval notation, a square bracket indicates an inclusive endpoint, meaning the endpoint belongs to the set. A parenthesis indicates an exclusive endpoint, meaning the endpoint does not belong to the set. The smaller endpoint is written first, followed by a comma and then the larger endpoint.
For example, the interval of amounts greater than $0$ and less than or equal to $100$ is
$$ (0,100]. $$
The parenthesis at $0$ excludes $0$, while the bracket at $100$ includes $100$. An unbounded interval uses a parenthesis with $\infty$ or $-\infty$, because infinity is not a number that can be included:
$$ (-\infty,4], \qquad (3,\infty). $$
The union symbol $\cup$ joins separate intervals. It is needed when the domain or range consists of disconnected pieces, such as all real numbers except $x=2$:
$$ (-\infty,2)\cup(2,\infty). $$
Example: Writing a Domain and Range in Interval Notation
Suppose a function has domain
$$ -3\leq x<5 $$
and range
$$ -2<y\leq 7. $$
Write both sets in interval notation.
For the domain, $-3$ is included because the inequality is $\leq$, and $5$ is excluded because the inequality is $<$. Therefore,
$$ \text{Domain}=[-3,5). $$
For the range, $-2$ is excluded and $7$ is included. Therefore,
$$ \text{Range}=(-2,7]. $$
The notation records endpoint information precisely. Replacing $[-3,5)$ with $(-3,5)$ would incorrectly remove the input $x=-3$, while replacing it with $[-3,5]$ would incorrectly include $x=5$.
Finding Domain and Range from Graphs
A graph displays the relationship between input values on the horizontal $x$-axis and output values on the vertical $y$-axis. To find the domain, identify all $x$-values used by points on the graph. To find the range, identify all corresponding $y$-values.
A useful visual method is to imagine shining a vertical light across the graph. The horizontal locations where the light touches the graph form the domain. To find the range, imagine shining a horizontal light across the graph; the vertical locations where it touches the graph form the range.
Solid dots indicate included points, while open circles indicate excluded points. Arrows indicate that the graph continues without bound. A gap in the graph can remove a value from the domain or range, even if the graph appears to approach that value.
Example: Reading Domain and Range from a Graph Description
Consider a graph consisting of a curve that begins at a solid point $(-2,3)$, passes through a lowest point at $(2,-3)$, and ends at a solid point $(4,3)$. Find its domain and range.
The leftmost point has $x=-2$, and the rightmost point has $x=4$. Both endpoints are solid, so both values are included. Thus,
$$ \text{Domain}=[-2,4]. $$
The lowest point has $y=-3$, and the highest points have $y=3$. These values are also included because the graph contains the points. Therefore,
$$ \text{Range}=[-3,3]. $$
The domain is determined by horizontal coverage, not by the curve’s height. The range is determined by vertical coverage, not by the curve’s left-to-right length. This distinction prevents the common error of switching the two.
Finding Domains and Ranges of the Toolkit Functions
The basic toolkit functions provide standard domain-and-range patterns. Recognizing these patterns makes it possible to identify restrictions quickly and to predict the general shape of a graph.
The identity function
$$ f(x)=x $$
has domain $(-\infty,\infty)$ and range $(-\infty,\infty)$.
The constant function
$$ f(x)=c $$
has domain $(-\infty,\infty)$ because every real input is allowed, but its range is the single value ${c}$.
The absolute value function
$$ f(x)=|x| $$
has domain $(-\infty,\infty)$ and range $[0,\infty)$ because absolute value cannot be negative.
The quadratic function
$$ f(x)=x^2 $$
also has domain $(-\infty,\infty)$ and range $[0,\infty)$. The square-root function
$$ f(x)=\sqrt{x} $$
has domain $[0,\infty)$ and range $[0,\infty)$.
The cubic function
$$ f(x)=x^3 $$
has domain $(-\infty,\infty)$ and range $(-\infty,\infty)$ because an odd power accepts and produces every real number.
The reciprocal function
$$ f(x)=\frac{1}{x} $$
has domain
$$ (-\infty,0)\cup(0,\infty) $$
because $x=0$ makes the denominator zero. Its range is also
$$ (-\infty,0)\cup(0,\infty), $$
because the output can never equal $0$.
Example: Finding Domain and Range Algebraically
Find the domain and range of
$$ f(x)=\sqrt{x-4}. $$
For the domain, require the radicand to be nonnegative:
$$ x-4\geq 0 $$
Add $4$ to both sides:
$$ x\geq 4. $$
Therefore,
$$ \text{Domain}=[4,\infty). $$
To find the range, let
$$ y=\sqrt{x-4}. $$
A square root is always nonnegative, so
$$ y\geq 0. $$
The smallest output occurs when $x=4$:
$$ f(4)=\sqrt{4-4}=\sqrt{0}=0. $$
As $x$ increases, $x-4$ increases and the square root can become arbitrarily large. Thus,
$$ \text{Range}=[0,\infty). $$
This function is a horizontal translation of $y=\sqrt{x}$ by $4$ units to the right. The translation changes the domain’s starting point from $0$ to $4$, but the range remains $[0,\infty)$.
Graphing Piecewise-Defined Functions
A piecewise-defined function uses different equations for different parts of the domain. Each formula is paired with a condition that specifies when that formula applies. To graph one, graph each formula only on its stated interval or set of inputs.
Endpoint symbols must match the inequalities. Use a closed or solid point when the endpoint is included, as in $x\leq 2$ or $x\geq 2$. Use an open point when the endpoint is excluded, as in $x<2$ or $x>2$.
Example: Graphing a Piecewise Function
Graph the piecewise-defined function
$$ f(x)= \begin{cases} x+2, & x<1,\ 3, & x\geq 1. \end{cases} $$
For the first piece,
$$ y=x+2, \qquad x<1. $$
The boundary value is $x=1$. Substitute it into the formula:
$$ y=1+2=3. $$
Because the condition is $x<1$, the point $(1,3)$ is open. Draw the line $y=x+2$ only to the left of $x=1$.
For the second piece,
$$ y=3, \qquad x\geq 1. $$
At the boundary value,
$$ y=3. $$
Because the condition is $x\geq 1$, the point $(1,3)$ is closed. Draw the horizontal ray $y=3$ beginning at $x=1$ and continuing to the right.
Both pieces meet at the coordinate $(1,3)$, but the first piece excludes that point while the second piece includes it. The graph therefore has an open endpoint from the first rule and a closed endpoint from the second rule at the same location.
The domain is obtained by combining the conditions:
$$ (-\infty,1)\cup[1,\infty)=(-\infty,\infty). $$
The range of the first piece is found from $y=x+2$ with $x<1$:
$$ x<1 $$
Add $2$ to both sides:
$$ x+2<3. $$
Thus, the first piece produces
$$ (-\infty,3). $$
The second piece is the constant value $3$, so its range is
$$ {3}. $$
Combining these gives
$$ \text{Range}=(-\infty,3)\cup{3}=(-\infty,3]. $$
The key procedure is to graph each formula separately, restrict it to its condition, mark each endpoint correctly, and then combine the resulting domains and ranges.
Practice Problems
- Find the domain of
$$ f(x)=\frac{2x-5}{x+4}. $$
Answer:
$$ x+4=0 $$
$$ x=-4. $$
Therefore,
$$ \boxed{\text{Domain}=(-\infty,-4)\cup(-4,\infty)}. $$
- Find the domain and range of
$$ g(x)=\sqrt{2x+6}. $$
Answer:
$$ 2x+6\geq 0 $$
$$ 2x\geq -6 $$
$$ x\geq -3. $$
Thus,
$$ \boxed{\text{Domain}=[-3,\infty)} $$
and, because a square root is nonnegative,
$$ \boxed{\text{Range}=[0,\infty)}. $$
- Find the domain and range of
$$ h(x)= \begin{cases} x-1, & x\leq 2,\ 4, & x>2. \end{cases} $$
Answer:
The conditions cover all real numbers, so
$$ \boxed{\text{Domain}=(-\infty,\infty)}. $$
For $x\leq 2$, the greatest value of $x-1$ occurs at $x=2$:
$$ 2-1=1. $$
Thus, the first piece has range
$$ (-\infty,1]. $$
The second piece contributes the value $4$, so
$$ \boxed{\text{Range}=(-\infty,1]\cup{4}}. $$
Content adapted from OpenStax College Algebra 2e by Jay Abramson et al., licensed CC BY 4.0.


Source Materials
Study College Algebra on Lykke
This course page is free to open: signed out, you can read its first two sections, and signing in, on any plan, opens the rest. The free Lykke Chrome extension syncs your own Canvas courses, so ChatGPT, Claude and Muse can answer from your classes and deadlines. It only reads Canvas.
Add the free extensionSign in to open every section