# Algebra/Chapter 8/Absolute Value Functions
## Introduction

You might have learned about absolute value before. Absolute value is defined such that:
    $|a|={\begin{cases}a,&{\mbox{if }}a\geq 0\\-a,&{\mbox{if }}a<0.\end{cases}}$
More simply, it can be defined as the distance between a number and zero on the real number line. Absolute value is written as |a|. So, |-3| is the absolute value of -3, which is 3. Variables, however, are unknown, so absolute value equations should have two possible solutions. In an equation such as |x + 4| = 25, the equation would hold if x + 4 was positive, negative or zero, so to solve that equation, two should be written down first; x + 4 = 25 or x + 4 = -25, with one equation turning the side of the equation without the absolute value into its opposite. From there, you should solve the two equations as you would any equation with variables. You only need to subtract 4 from both equations to get the solution: x = 21 or x = -29. In absolute value equations, the absolute value must be isolated, like you would a variable. In an equation such as 4|x - 7| + 9 = 21, first subtract 9 and divide by 4.
For any real number a the absolute value of a is denoted by | a | (a vertical bar on each side of the quantity) and is defined as
    $|a|={\begin{cases}a,&{\mbox{if }}a\geq 0\\-a,&{\mbox{if }}a<0.\end{cases}}$
As determined from the above definition, the absolute value of a is always either positive or zero, but never negative.
From an analytic geometry point of view, the absolute value of a real number is that number's distance from zero along the real number line, and more generally the absolute value of the difference of two real numbers is the distance between them.
The absolute value function is a piecemeal function that does nothing to positive numbers, and inverts negative numbers, so it returns all positive numbers.
Absolute value can be expressed as a function: f(x) = |x| = x if x is positive, = -x if x is negative. The domain includes all real numbers (absolute value can be expanded to more numbers once we introduce them), and the range is all non-negative numbers (all positive numbers and 0).
This function is the same as asking how far a given number is from zero: both 6 and -6 are 6 units away from zero so |-6| = |6| = 6.
Absolute value can also be used to 'measure' the distance between two numbers: |a-b| would return how many units apart a and b are. Let's use 7 and 9. We intuitively know that 7 is two units away from 9 and 9 is two units away from 7. Here is how we see that with absolute values: |9-7| = |2| = 2 and |7-9| = |-2| = 2

### Graph

Absolute value functions graphed exhibit a sharp switch from positive to negative, forming a 'V' shape.
This is the graph of y = |x|. Notice that the y-values remain positive when the x-values become negative.

## Solving Equations with Absolute Value

To algebraically solve an equation with absolute value, it should be solved with both halves of the piece-mail equation. Solve for the absolute value and replace with +/-. Remember that this will almost always create 'false' solutions, so solutions must be 'checked.'
example:
* |3a - 5| - 6 = 3y - 2
* |3a - 5| = 3y + 4
* 3a - 5 = 3y + 4 or 3a - 5 = -(3y + 4)
From here, two different equations need to be solved:
* 3a - 5 = 3y + 4
* 3y = 3a - 9
* y = a - 3
And the second equation:
* 3a - 5 = -(3y + 4)
* -3y - 4 = 3a - 5
* -3y = 3a - 1
* y = -a + 1/3
We know how to calculate y, but it still depends on what a is.
If 3a - 5 if positive, y = a - 3
* 3a - 5 ≥ 0
* 3a ≥ 5
* a ≥ 5/3
For any value of a ≤ 5/3, y = -a + 1/3
The next example contains an inconsistent equation:
* |2k + 6| + 3 = 0
* |2k + 6| = -3
Here, there is no valid solution since the absolute value can only equal a positive number. It may appear that you can continue the same operations, but if you check the result, you will discover that the left and right sides will not match.