Let's draw the graph of y=∣x∣, and divide it into two parts. One part for positive x-values and one for negative.
When taking the absolute value of a positive number, the absolute value will not affect anything. This means that when x is greater than 0, the output of the function will be the same as the input value. Therefore, the graph of y=∣x∣ is identical to the one for y=xwhen x≥0. For x=0, the output of the function is 0. This means that the origin is a point on the graph.
When we have negative input values, the absolute value makes the value change its sign and the output becomes positive. This sign change can be represented by a minus sign in front of the function we drew for positive x-values, which means y=-xwhen x≤0. For negative x-values, we mirror the graph of y=x to get y=∣x∣. The graph will then be placed above the x-axis at the corresponding positive numbers.
The output of the expression ∣x∣ can only be positive numbers and 0. But the minus sign in front of ∣x∣ will make the positive values negative. Let's study this by looking at a few examples.
x | -∣x∣ | Simplify |
---|---|---|
-2 | -∣-2∣ | -2 |
-1 | -∣-2∣ | -1 |
0 | -∣0∣ | 0 |
1 | -∣1∣ | -1 |
2 | -∣2∣ | -2 |
For the function y=-∣x∣, this means that all values of the function change sign and end up under the x-axis at the corresponding negative value.
Note that this function is not given in the form y=∣f(x)∣ but on the form y=-∣f(x)∣, which means that the graph in this case ends up below the x-axis.