TOPIC
Graphing piecewise linear functionsMY PROGRESS
Pug Score
0%
Getting Started
"Let's build your foundation!"
Study Points
+0
Overview
Watch
Read
Next Steps
Get Started
Get unlimited access to all videos, practice problems, and study tools.
Back to Menu
Topic Progress
Pug Score
0%
Getting Started
"Let's build your foundation!"
Videos Watched
0/0
Read
Not viewed
Study Points
+0
Overview
Watch
Read
Next Steps
Read
Graphing Piecewise Linear Functions
This lesson explains how to graph piecewise linear functions by treating each rule as a separate line restricted to its own domain. It covers reading domain conditions, plotting each piece, choosing open or closed circles at boundary points, and combining the pieces into one graph.
What Is a Piecewise Linear Function?
A piecewise linear function is a function built from two or more straight-line rules, where each rule only applies over a specific part of the domain. Instead of one equation describing the whole graph, you get something like this:
\( f(x) = \begin{cases} x + 2, & x < 0 \)
\( -x + 3, & x \ge 0 \end{cases} \)
Each line segment (or ray) is graphed using the same skills you already use for graphing linear functions using various forms, but you only draw the part of the line that falls inside the domain condition attached to it. Before graphing, it helps to already be comfortable evaluating these functions at specific x-values; if that part feels shaky, review evaluating piecewise functions first.
Steps to Graph a Piecewise Linear Function
Follow the same four steps for any piecewise linear function you are given:
1. Write down each rule and its domain restriction separately.
2. Graph each rule as if it were a full line, using slope and a y-intercept or a table of values, then keep only the portion of the line inside its domain.
3. At every boundary x-value, check the inequality symbol: use \(<\) or \(>\) for an open circle (the point is not included) and \(\le\) or \(\ge\) for a closed circle (the point is included).
4. Combine all the pieces on the same coordinate plane to get the final graph.
Open Circles vs. Closed Circles
The type of circle at each boundary tells the reader whether that exact point belongs to the graph. Getting this detail wrong is the most common mistake when graphing piecewise linear functions.
Worked Example
Graph the piecewise linear function:
\( f(x) = \begin{cases} x + 2, & x < 0 \)
\( -x + 3, & x \ge 0 \end{cases} \)
Piece 1: \(f(x) = x + 2\) applies only when \(x < 0\). This is a line with slope \(1\) and y-intercept \(2\). Since the domain condition is strict inequality, the endpoint at \(x = 0\) is an open circle, sitting at the point \((0, 2)\).
Piece 2: \(f(x) = -x + 3\) applies when \(x \ge 0\). This line has slope \(-1\) and y-intercept \(3\). Because the domain condition includes equality, the endpoint at \(x = 0\) is a closed circle, sitting at the point \((0, 3)\).
Placing both pieces on the same axes shows a jump: as \(x\) approaches \(0\) from the left, the graph heads toward \((0, 2)\) but that point is excluded, while at \(x = 0\) the graph actually sits at \((0, 3)\). This gap is called a jump discontinuity, and it is completely normal for a piecewise linear function.
Checking Your Graph
Once every piece is drawn, run a vertical line test across the whole graph. Because each x-value should belong to exactly one piece's domain, a properly graphed piecewise function will still pass this test even though it is made of separate segments. If you also need to describe the domain and range of the completed graph in interval notation, that skill is covered separately in how to write domain and range.
Common Mistakes
Watch out for these errors when graphing piecewise linear functions:
Drawing a full line instead of stopping at the domain boundary.
Using the wrong circle type at an endpoint because the inequality symbol was misread.
Assuming the pieces must connect; many piecewise linear functions are intentionally discontinuous.
Mixing up which rule applies at the boundary value itself, rather than checking the inequality carefully.
Piecewise Linear Functions and Absolute Value
One of the most familiar piecewise linear graphs is the V-shape of an absolute value function, which is really just two linear pieces joined at a vertex with no gap. If you want to see that case worked through in detail, it is covered in absolute value functions. When the individual pieces are curves instead of straight lines, the same domain-splitting idea still applies, just with different rules to graph; that situation is handled on its own page as well.