Britannica
Sources used in this answer
How can the absolute value function be written using different rules for positive and negative inputs?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
function
Plot of the cubic equation f(x) = x3 − 3x + 2. The plotted points are where changes in curvature occur.
The absolute value function, denoted as , measures the magnitude of a real number and represents its distance from zero on a number line. Because distance is always non-negative, the function is defined using a piecewise rule that accounts for the sign of the input.1
The absolute value function can be written as:
In this definition, if the input is positive or zero, the output is simply . If the input is negative, the output is the negation of (), which results in a positive value. This approach of defining a function using different rules for discrete intervals is known as a piecewise definition.12