In this lesson, you will graph piecewise functions. Specifically, this lesson will cover:
1. Graphing a Function on a Restricted Domain
When we graph a function, we are considering the entire function. What if we only wanted part of the graph?
-
To sketch a portion of the graph, a restricted domain is used. Recall that the domain of a function is the set of all possible inputs for a function.
For example, in Graph 3 above, the
is the domain restriction since it is not the entire domain of
(which is all real numbers).
-
When an endpoint is included, we represent it by using a closed circle. See Graphs 2, 3, and 4.
When an endpoint is not included, we represent it by using an open circle. See Graph 3.
-
Consider the following function:
Graph this function.Remembering that

is a line with slope 2 and y-intercept 1, we graph the line but only for values of
x up to and including 4.
-
- Restricted Domain
- Part of, but not the entire, domain of a function.
2. Graphing Piecewise Functions
A piecewise function is made up of other functions that are on restricted domains. For example, consider the function:

The function tells us to use “

”, but only if the input is less than 2; and to use “

” if the input is at least 2.
This means that the graph of the function will be “part of” the graph of
along with “part of” the graph of
Here is how we put this together:
The graph of
is these pieces put together on one graph as follows:
-
The following video walks you through the process of graphing a piecewise function.
-
A common mistake when graphing piecewise functions is to graph each function entirely instead of considering the domains.
Consider the function
If you were to graph

and

on the same axes, you would have this picture.
We know this can’t be the graph of the piecewise function, since this graph fails the vertical line test.
The moral of the story is – pay attention to the domain restrictions, including when an endpoint is open vs. closed. It’s important that the graph you produce is a function, meaning it passes the vertical line test.
In this lesson, you recalled that when you graph a function, you consider the entire function. However, if you only want part of the graph, you learned how to graph a function on a restricted domain, which is part of, but not the entire, domain of a function. You learned how to apply this knowledge to graphing piecewise functions—which are made up of other functions that are on restricted domains—which requires you to graph each piece on their respective restricted domains of the function.