How to Graph Piecewise Functions

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Translating Piecewise Functions

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:06 What Is a Function?
  • 1:08 What Is a Piecewise Function?
  • 1:50 Graphing Piecewise Functions
  • 3:29 Three Is Not a Crowd
  • 4:31 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Jennifer Beddoe

Jennifer has an MS in Chemistry and a BS in Biological Sciences.

Piecewise functions are specific functions that have more than one piece. There is a special trick to graphing these type of functions, which you will learn in this lesson.

What Is a Function?

Mathematically, a function is a set of outputs related to specific inputs. Practically speaking, a function is like a machine. When you put something in, you get a specific something out. Let's say you have a candy machine - whenever you put a certain ingredient in, it makes a specific candy. If you add chocolate, you get fudge. If you add peanut butter, the machine makes cookies, and if you add fruit, out comes a pie. The machine works this way every time, no exceptions. You always get a specific outcome with each different input.

Mathematical functions work the same way. A function is an equation where each input gives a specific outcome. For example, y = x + 2 is a function. For each input, (x), you put in the function, you get a specific outcome, (y). An input of 2 gives an outcome of 4, always. You will never put a 2 into this particular function and get a different outcome.

What Is a Piecewise Function?

A piecewise function is a function that has different parts, or pieces. The machine or the function works differently for each of the different pieces.

For example:

f(x) = x - 2, x < 3

f(x) = (x - 1)^2, x is greater than or equal to 3

This function behaves differently if the input is less than 3 or greater than or equal to 3. The most common piecewise function is the absolute value function. It works differently if the input is less than 0 than it does if the input is greater than 0.

Graphing Piecewise Functions

The process of graphing a piecewise function is a bit different from graphing a regular function. The best way to graph a piecewise function is to think of the coordinate plane as a neighborhood and the functions as neighbors. First, we need to determine where the fence between the neighbors should be. In the case of our previous example, the fence goes at x = 3. So, the first step to graph this particular function is to draw a dotted vertical line at x = 3.

Next, you need to determine which neighbor owns the fence. This will always be the function with the 'equal to' part, in this case, f(x) = (x - 1)^2. This means that the graph of this line gets to sit on the fence, so it will be a closed dot on the line at x = 3. Finally, we can graph both equations separately on the correct side of the fence, remembering that the one with the equal sign gets to sit on the fence.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account