If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Algebra I (2018 edition)

### Course: Algebra I (2018 edition)>Unit 11

Lesson 2: Piecewise functions

# Worked example: graphing piecewise functions

A piecewise function is a function that is defined in separate "pieces" or intervals. For each region or interval, the function may have a different equation or rule that describes it. We can graph a piecewise function by graphing each individual piece.

## Want to join the conversation?

• Does this mean that you can make the graphs of functions I've seen that bump up and down using this? Is there anything else? Thx
• If you're talking about sawtooth functions, square waves, or triangle waves, yes. A sawtooth function can be represented by the piecewise linear function: x-floor(x), and similarily the other waveforms can be represented by more convoluted combinations of floor functions, which are piecewise.
• At the blue and purple lines join at a point. How do you know whether to make that point an open circle or a closed circle, if they were different inequalities? Does it always just become coloured in?
• Christopher,
You asked an excellent question. In the video, Sal did not stress why he filled in the circle, probably because he assumed this had been covered in another video.

I'll try to explain it.

When Sal did the first interval, at , he left the circle not filled in at (-2,5) because the second sign was > and not ≤. But then Sal did the next interval at the same point at (-2,5) was calculated, but this time the ≤ was used in the first part of the interval. Because this included being "equal to", the circle was then filled in.

Had the second interval been x+7, -2 *<* x < -1, neither interval would have had a closed circle at (-2,5), so the point would have had an open circle.

As each interval is worked, the circle is either filled in or left open If the same point is first left open, but in the next interval, it should be filled in, it is filled in. However, if the problem had been different, and the point was filled in on the first interval, but the same point would have normally been not filled in on the next interval, it still remains filled in.

I hope that helps make it click for you.
• what should I do if the equation says f(x) = (bracket) 3 if x< 2. what should I do with the 3? where can I plug in the 2?
• Sorry this is super late, but here's my understanding of it.

F(x) = ()3, x < 2

This piece of function would apply to any x value from negative infiniti up to (but not including) two. The 2 is just there to tell you what x variables that function piece applies to. That 3 would be multiplied by whatever is in the parenthesis.
• are the lines not always straight?
• The pieces in a piecewise function do not have to be straight. The graph for each piece is determined by its definition.
• Do you write the x and y points in the order of which line is the highest on the graphs?
• The order you draw the lines should not affect your answer
• idk what im doing
• mmk, but what if there's no "x" in the first part of the equation? (for example if it was just 7 instead of "x+7")
• Then that piece of the graph would be a horizontal line. Solid dot at (-2,7); open dot at (-1, 7) and connect the points.
• at how do you know if the blue and purple lines are closed or open circles.
• The inequality symbols tell you which to use.
Notice, the 1st part of the blue line tells you -10<=x. This means "x" can equal 10 or be larger than 10. Since "x" can equal -10, use a closed circle. On the opposite end, it tells you x<-2. Now "x" must be less than -2. It can't equal -2. This is when you use the open circle.

Hope this helps.