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.

Main content

Absolute value & piecewise functions: FAQ

Frequently asked questions about absolute value & piecewise functions

What is absolute value?

Absolute value is a function that outputs the distance of any input from 0 on the number line. We often write the absolute value of a number with vertical bars on either side, like |x|.

What do graphs of absolute value functions look like?

For the most basic absolute value function, y=|x|, the graph looks like a "V" shape with the vertex at the origin. As we modify the function (for example, by shifting it vertically or horizontally), the graph will change accordingly, but it will maintain the general "V" shape.

What are piecewise functions?

Piecewise functions are functions that are defined in separate "pieces" for different intervals of the input. For example, we could define a piecewise function f(x) like this:
f(x)={2xif x03x+1if x>0
This function will multiply an input by 2 for inputs less than or equal to 0, and multiply it by 3 and add 1 for inputs greater than 0.

What do graphs of piecewise functions look like?

The graph of a piecewise function will depend on the specific function itself. However, a common feature is that the graph may appear "broken" or disjointed at the points where the function changes definitions. For the function f(x) above, the graph will be two different lines that meet at the origin.

Where are absolute value functions and piecewise functions used in the real world?

Both types of functions are used in a variety of contexts. Absolute value functions can be helpful when we want to measure distances or find the magnitude of a certain quantity. Piecewise functions are often used to model situations where different rules or formulas apply in different situations.

Want to join the conversation?