This graph shows Andre biking to his friend’s house, where he hangs out for a while. Then they bike together to the store to buy some groceries before racing back to Andre’s house for a movie night. Each line segment in the graph represents a different part of Andre’s travels.
This is an example of a piecewise linear function, which is a function whose graph is pieced together out of line segments. It can be used to model situations in which a quantity changes at a constant rate for a while, then switches to a different constant rate.
We can use piecewise functions to represent stories, or we can use them to model actual data. In the second example, temperatures recorded at different times throughout a day are modeled with a piecewise function made up of two line segments. Which line segment do you think does the best job of modeling the data?