in this tutorial we're going to focus on graphing piecewise functions so let's start with this particular example f of x is equal to x when x is less than zero and it's equal to five when x is equal to or greater than zero now let's graph these two functions separately so we can get an idea of what they look like so the graph f of x equals x or y equals x is basically a straight line with a slope of one so it rises at a 45 degree angle so that's y equals x now the second graph f of x equals five or y equals five it looks like this it's a horizontal line at five now we only need this portion of the graph when x is less than zero and we need this portion of the graph when x is greater than or equal to zero so the piecewise function is going to combine the left side of this graph with the right side of that graph so let's put it all together so when x is less than zero but not including zero we're going to have to graph y equals x so i'm going to put an open circle at zero because it does include zero but it's going to look like y equals x on the left side now on the right side it looks like y equals five but it includes zero so i'm going to use a closed circle at 5. so keep in mind the y value there is 5. and that's how you can graph this particular piecewise function let's work on another example so let's say that f of x is equal to two when x is less than one and it's equal to x plus three when x is greater than two so feel free to pause the video and try this example so it's equal to two when x is greater than one i mean when x is less than one i take that back and it doesn't include uh one itself it's less than one not equal to one so we're going to have a an open circle at one comma two and because it's just a constant it's going to be a horizontal line but less than one so we got to graph it to the left now at two we're gonna have the graph x plus three now this particular graph has a y intercept of three and it has a slope of one so it has these points so when x is 2 this graph is going to be at 5. so it's going to be up here already and then it's just going to increase at a 45 degree angle with a slope of so i'm running out of space but this is how the graph is going to look like if we take this part out so this has a y value of five we don't have any closed circles in this example because there's no underline with the inequality it's just x is less than one or greater than two here's another example let's say that f of x is equal to two x plus one when x is less than one and it's equal to one when x is equal to one and it has a value of negative x squared when x is greater than one so let's start with this so when x is one if we plug in one into this expression that's going to be two times one plus one so that's going to give us the point one comma three and that's going to be an open circle because it does include one now this graph it has a slope of two and a y-intercept of 1. keep in mind it's a linear equation in the form y equals mx plus b so the number in front of x is the slope and this number is the y-intercept so we also have this point when x is zero y is one so we can say this graph looks like this we can only plot the left side of the graph where x is less than one now here when x equals one y is one so that's just a point we don't have a straight line there's no range of x values it's just one single x value so we got the point one comma one so when x is one y is one so this can be a closed circle right here now when x is greater than one we have the graph negative x squared positive x squared looks like this it's a parabola that opens upward and what do you think negative x squared looks like this is a parabola that opens downward so if we plug in a 1 into this expression that's going to give us negative 1. so it's going to have a point in this region but we're going to use an open circle because this doesn't include one now when x is 2 this will be negative 2 squared which will be negative 4. and that should be somewhere down here so it's going to look something like this we need to give it a curved shape it won't be a straight line and so that's the general shape of this particular piecewise function as long as you take your time graph it step by step you should be fine it's not that difficult but let's work on some more examples so let's say that f of x is three x plus four when x is less than zero it's equal to two when x is equal to zero and then it's equal to the square root of x when x is greater than one so go ahead and take a minute and try that so let's start with this so once again we have a linear equation y is equal to mx plus b m is 3 and b is 4. so the y intercept is form when x is 0 y is 4. so we're going to have an open circle at 0 comma four now we can only graph the left side of that function so if we plot the point x equals negative one the y value will be one three times negative one plus four that's negative three plus four so that's one so we got the point negative one comma one also you could use the slope the slope is three so if you go backwards you need to go one into left down three that'll give you the point one comma one so this graph looks like this when plotting a linear equation or linear function you only need two points to graph it and then connect it with a straight line now let's focus on the next part so when x is zero y is two so we got the point zero comma two and that's going to be a closed circle let me put that in red and then when x is greater than one we have the square root of x so if we plug in one into the square root of x function the square root of one is one so we got the point one comma one but we need to use an open circle it doesn't include one and then the next point i would plug in to this expression is four because the square root of 4 is 2 so that will give us the point 4 comma 2. and so the square root function looks like that it's an increase in function that increases at a decreasing rate it increases slowly and so this is the piecewise function that we have for this particular example now let's try one last example so let's say that f of x is one over x when x is less than zero it's equal to three when x is between zero and three and it's equal to negative x plus five when x is equal to or greater than three so one over x looks like this it's negative on the left side but positive on the right side so that's the graph of one over x now we only need a portion where x is less than zero so we only need that portion of the graph so let's get rid of this stuff on the right now between zero and three the y value will be equal to three so it includes x equals zero we're going to have a closed circle here but it doesn't include x equals three so i'm going to put an open circle at this point so it's a straight line at three at a y value of three now when x is equal to or greater than three we have negative x plus five so if we plug in three into that expression it's going to be negative three plus five which is 2 so we're going to have a closed circle at 3 comma 2. now the next point if we plug in 4 negative 4 plus 5 is 1. we can see why it's going down because it has a slope of negative one if we plug in five negative five plus five will be zero so that will be the x intercept of this piecewise function and so we can see it's going down like that and so that's it for this example you