Absolute Value

What is Absolute Value?

The absolute value of a number is its magnitude — its size without a sign. Another way to say the same thing: it's the number's distance from 0 on the number line. The number 5 sits 5 units from zero, so its absolute value is 5. The number \(-5\) sits the same distance from zero on the other side, so its absolute value is also 5. In both cases, the negative sign is stripped away and the remaining magnitude is 5.

Number line with 5 and -5 showing absolute value

Taking the absolute value leaves a positive number alone and flips a negative number to positive.

Quick check — what does \(|-7|\) equal? Show answer\(|-7| = 7\). Distance from zero is always positive.

How do I write it?

Absolute value is written using vertical bars: \(|x|\), read as "the absolute value of \(x\)." In calculators and code, you'll sometimes see it written as abs(x) instead, which means the same thing. On homework and tests, stick with the \(|x|\) notation — that's what teachers expect.

Applications

A useful trick: to force any number to be negative, write \(-|x|\). The absolute value first strips any sign and makes the number positive, then the leading minus sign flips it negative. Why do it this way? Putting a minus sign in front of a number doesn't always make it negative — if the number was already negative, the minus sign just makes it positive. Wrapping it in absolute value bars first guarantees a positive value to negate.

Practice Examples

Try solving these on your own, then check the solutions below:

Basic Examples:

  1. \(|15| = ?\) Show answer\(|15| = 15\) (already positive)
  2. \(|-23| = ?\) Show answer\(|-23| = 23\) (remove negative sign)
  3. \(|7 - 12| = ?\) Show answer\(|7 - 12| = |-5| = 5\) (simplify inside first, then take absolute value)
  4. \(-|6| = ?\) Show answer\(-|6| = -6\) (absolute value makes it positive, then the negative sign outside makes it negative)

Taking the Absolute Value of an Algebraic Expression

Computing absolute value is easy when the contents are a constant. Once a variable shows up inside the bars, things get more interesting. Suppose you need to solve for \(x\):

$$|x+2| = 9$$

You can't assume \(x+2\) is positive or negative, so you can't just "drop the bars." If \(x+2\) were negative, then \(|x+2|\) would equal \(-(x+2)\) — the negative of a negative is a positive. The way through this is to split into two cases.

Case 1. Assume \(x + 2\) is positive. The absolute value bars don't change anything, so the equation becomes:

$$x + 2 = 9$$ $$x = 7$$

Case 2. Assume \(x + 2\) is negative. Then \(|x + 2| = -(x + 2)\), and the equation becomes:

$$-(x + 2) = 9$$ $$-x - 2 = 9$$ $$-x = 11$$ $$x = -11$$

The two solutions are \(x = 7\) and \(x = -11\). Plug each one back into the original to verify: \(|7 + 2| = 9\) ✓ and \(|-11 + 2| = |-9| = 9\) ✓.

More complicated equations work the same way: split the absolute value into two cases and solve each. Always plug your answers back into the original equation. If a "solution" doesn't satisfy the original equation, it's extraneous and must be discarded.

Equation Examples:

  1. \(|x| = 14\) Show answer\(x = 14\) or \(x = -14\) (two solutions)
  2. \(|x - 5| = 8\) Show answerCase 1: \(x - 5 = 8\), so \(x = 13\). Case 2: \(x - 5 = -8\), so \(x = -3\).
  3. \(|2x + 3| = 11\) Show answerCase 1: \(2x + 3 = 11\), so \(2x = 8\), thus \(x = 4\). Case 2: \(2x + 3 = -11\), so \(2x = -14\), thus \(x = -7\).
  4. \(|x| + 4 = 9\) Show answerFirst isolate: \(|x| = 5\). Then solve: \(x = 5\) or \(x = -5\).

A few things worth keeping in mind. An equation like \(|x| = 8\) has two solutions, \(x = 8\) and \(x = -8\). An absolute value can never equal a negative number, so an equation like \(|x| = -3\) has no solution at all. And whenever you split into cases, always plug your answers back in to make sure both work.

Absolute Value Calculator

Enter any number to see its absolute value.