<< Chapter < Page Chapter >> Page >
This module introduces piecewise functions for the purpose of understanding absolute value equations.

What do you get if you put a positive number into an absolute value? Answer: you get that same number back. 5 = 5 size 12{ lline 5 rline =5} {} . π = π size 12{ lline π rline =π} {} . And so on. We can say, as a generalization, that x = x size 12{ lline x rline =x} {} ; but only if x size 12{x} {} is positive .

OK, so, what happens if you put a negative number into an absolute value? Answer: you get that same number back, but made positive. OK, how do you make a negative number positive? Mathematically, you multiply it by –1 . 5 = ( 5 ) = 5 size 12{ lline - 5 rline = - \( - 5 \) =5} {} . π = ( π ) = π size 12{ lline - π rline = - \( - π \) =π} {} . We can say, as a generalization, that x = x size 12{ lline x rline = - x} {} ; but only if x size 12{x} {} is negative .

So the absolute value function can be defined like this.

The “piecewise” definition of absolute value

x = { x , x 0 x , x < 0

If you’ve never seen this before, it looks extremely odd. If you try to pin that feeling down, I think you’ll find this looks odd for some combination of these three reasons.

  1. The whole idea of a “piecewise function”—that is, a function which is defined differently on different domains—may be unfamiliar. Think about it in terms of the function game. Imagine getting a card that says “If you are given a positive number or 0, respond with the same number you were given. If you are given a negative number, multiply it by –1 and give that back.” This is one of those “can a function do that ?” moments. Yes, it can—and, in fact, functions defined in this “piecewise manner” are more common than you might think.
  2. The x size 12{ - x} {} looks suspicious. “I thought an absolute value could never be negative!” Well, that’s right. But if x size 12{x} {} is negative, then x size 12{ - x} {} is positive. Instead of thinking of the x size 12{ - x} {} as “negative x size 12{x} {} ” it may help to think of it as “change the sign of x size 12{x} {} .”
  3. Even if you get past those objections, you may feel that we have taken a perfectly ordinary, easy to understand function, and redefined it in a terribly complicated way. Why bother?

Surprisingly, the piecewise definition makes many problems easier . Let’s consider a few graphing problems.

You already know how to graph y = x size 12{y= lline x rline } {} . But you can explain the V shape very easily with the piecewise definition. On the right side of the graph (where x 0 size 12{x>= 0} {} ), it is the graph of y = x size 12{y=x} {} . On the left side of the graph (where x < 0 size 12{x<0} {} ), it is the graph of y = x size 12{y= - x} {} .

Line with a negative slope of 1 passing through the origin
y = - x The whole graph is shown, but the only part we care about is on the left, where x < 0 size 12{x<0} {}
A line with a positive slope of 1 with y-intercept 0
y = x The whole graph is shown, but the only part we care about is on the right, where x 0 size 12{x>= 0} {}
Graph showing the absolute value of x with cusp at (0,0).
y = | x | Created by putting together the relevant parts of the other two graphs.

Still, that’s just a new way of graphing something that we already knew how to graph, right? But now consider this problem: graph y = x + x size 12{y=x+ lline x rline } {} . How do we approach that? With the piecewise definition, it becomes a snap.

x + | x | = { x + x = 2 x x 0 x + ( - x ) = 0 x < 0

So we graph y = 2x size 12{y=2x} {} on the right, and y = 0 size 12{y=0} {} on the left. (You may want to try doing this in three separate drawings, as I did above.)

Combined peice-wise Graph
y = x + | x |

Our final example requires us to use the piecewise definition of the absolute value for both x and y .

Graph |x|+|y|=4

We saw that in order to graph x size 12{ lline x rline } {} we had to view the left and right sides separately. Similarly, y size 12{ lline y rline } {} divides the graph vertically .

  • On top, where y 0 size 12{y>= 0} {} , y = y size 12{ lline y rline =y} {} .
  • Where y < 0 size 12{y<0} {} , on the bottom, y = y size 12{ lline y rline = - y} {} .
Since this equation has both variables under absolute values, we have to divide the graph both horizontally and vertically, which means we look at each quadrant separately . x + y = 4 size 12{ lline x rline + lline y rline =4} {}
Second Quadrant First Quadrant
x 0 size 12{x>= 0} {} , so x = x size 12{ lline x rline = - x} {} x 0 size 12{x>= 0} {} , so x = x size 12{ lline x rline =x} {}
y 0 size 12{y>= 0} {} , so y = y size 12{ lline y rline =y} {} y 0 size 12{y>= 0} {} , so y = y size 12{ lline y rline =y} {}
( x ) + y = 4 size 12{ \( - x \) +y=4} {} x + y = 4 size 12{x+y=4} {}
y = x + 4 size 12{y=x+4} {} y = x + 4 size 12{y= - x+4} {}
Third Quadrant Fourth Quadrant
x 0 size 12{x<= 0} {} , so x = x size 12{ lline x rline = - x} {} x 0 size 12{x<= 0} {} , so x = x size 12{ lline x rline =x} {}
y 0 size 12{y<= 0} {} , so y = y size 12{ lline y rline = - y} {} y 0 size 12{y<= 0} {} , so y = y size 12{ lline y rline = - y} {}
( x ) + ( y ) = 4 size 12{ \( - x \) + \( - y \) =4} {} x + ( y ) = 4 size 12{x+ \( - y \) =4} {}
y = x 4 size 12{y= - x - 4} {} y = x 4 size 12{y=x - 4} {}
Now we graph each line, but only in its respective quadrant. For instance, in the fourth quadrant, we are graphing the line y = x 4 size 12{y=x - 4} {} . So we draw the line, but use only the part of it that is in the fourth quadrant.
Graph
Repeating this process in all four quadrants, we arrive at the proper graph.
Graph
x + y = 4

Got questions? Get instant answers now!

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Advanced algebra ii: conceptual explanations. OpenStax CNX. May 04, 2010 Download for free at http://cnx.org/content/col10624/1.15
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Advanced algebra ii: conceptual explanations' conversation and receive update notifications?

Ask