✖

Linear equations with absolute value

Absolute value is a function that leaves a non-negative number unchanged and turns a negative number into a positive one. Absolute values can turn up when you solve linear equations.

Recap

Let’s remind ourselves how absolute value is calculated and written. We write an expression inside absolute value using vertical bars, like this: |a|. We say “the absolute value of a”. The absolute value of a non-negative number is the same number. Examples: |3| = 3, |64| = 64, |π| = π. The absolute value of a negative number, however, is a positive number: |−7|=7,|−π|=π,|−12|=12. The absolute value of zero is zero.

A simple example

An example of a simple linear equation with absolute value is |x| = 3. The question now is: when does the absolute value give us three? There are two values of x – one positive and one negative – so the equation has two solutions. The first is x1 = 3, because |3| = 3. The second is x2 = −3, because |−3| = 3.

Let’s make the equation a bit harder: |2x + 1| = 5. Now we have a more complicated expression inside the absolute value. But we can proceed in exactly the same way as a moment ago. Which numbers have an absolute value of five? Again 5 and −5. What follows from this? That the inside of the absolute value, the expression 2x + 1, must equal five or minus five. Only then does the equation have a solution. So we solve the equations 2x + 1 = 5 and 2x + 1 = −5. We solve them as ordinary linear equations. We get:

2x+1=52x=4x=2

And the second solution:

2x+1=−52x=−6x=−3

So we have two solutions: x1 = 2 and x2 = −3. We can check them by substituting into the original equation. For x = 2 we get |2 · 2 + 1| = |4 + 1| = |5| = 5, and for x = −3 we have |2 · (−3) + 1| = |−6 + 1| = |−5| = 5.

Removing the absolute value

The previous method is hard to apply, though, when the equation is more complicated. For example this one:

|4x+2|+|x−1|=6

Here we have two expressions in absolute value, so we need a different approach. First a slightly simpler example: what is true of the expression |x − 2| if we take x from the interval (2, ∞)? The expression inside the absolute value will always be positive. If we substitute three, for example, we get 3 − 2 = 1. If we substitute ten, we get 10 − 2 = 8, and so on. For any number from this interval, the expression inside the absolute value is positive. So what does the absolute value do to the value? Nothing at all. This is an important observation. If the expression inside the absolute value is always positive, we can remove the absolute value – it is unnecessary. If we take x from the interval (2, ∞), then |x − 2| = x − 2 (that is, we have removed the absolute value).

Now the opposite example: what if we take x from the interval (−∞, 2)? What will the value of the expression inside the absolute value, x − 2, be? It will always be negative! Let’s try substituting one: 1 − 2 = −1, or zero: 0 − 2 = −2. What does the absolute value do to such a value? It flips it to a positive one, that is, it changes the sign. We can change the sign by multiplying by minus one, because 5 · (−1) = −5, but also −7 · (−1) = 7 and −15 · (−1) = 15.

So if we take x from the interval (−∞, 2), the expression inside the absolute value will always be negative, and the absolute value will take effect and change the sign of the expression – it multiplies it by −1. We can therefore write that for x in (−∞, 2) we have |x − 2| = −(x − 2). Let’s try substituting zero. First into the expression with absolute value: |0 − 2| = |−2| = 2, and now into the right-hand side: −(0 − 2) = −(−2) = 2.

As you can see, intervals like these let us split an expression with absolute value into two different expressions that we can solve completely separately. That is useful. The question that remains is: how do we find these intervals?

The critical values method

When did the expression x − 2 change sign? From the previous section we know that in the whole interval (−∞, 2) the expression is negative and in the whole interval (2, ∞) it is positive. What is it at the point x = 2? Substituting, we find that 2 − 2 = 0, so it is zero. This is no coincidence. The reason is easiest to see on the graph of a linear function:

The graph of y=x-2. At x=2 the line passes from the negative part to the positive part

The graph of a linear function is a straight line. It can cross the x-axis only once, and when it crosses the x-axis it changes sign. So if a linear function crosses the x-axis at the point a, then on the interval (−∞, a) it has a different sign from the one it has on the interval (a, ∞).

So if we are looking for the intervals where a linear function is positive and where it is negative, all we need to do is find the critical value, that is, the point x0 at which the linear function f has the value zero: f(x0) = 0. So if we want the intervals where the expression x − 2 is positive, we first solve the equation x − 2 = 0. The solution is x = 2. Then we can form the intervals (−∞, 2) and (2, ∞). In each of these intervals we then continue solving the equation, but with the absolute value removed.

Back to the example at last…

Many lines ago we set up an example:

|4x+2|+|x−1|=6

How do we solve it? First we find the critical value of each expression inside an absolute value, that is, of 4x + 2 and x − 1. The expression 4x + 2 has the critical value x=−12 and the expression x − 1 has the critical value x = 1. Since we have two critical values, we will have three intervals in total. Each critical value splits the interval (−∞, ∞) in some way. So we get the intervals (−∞,−12), [−12,1] and (1, ∞). We always choose the intervals so that together they cover the whole interval (−∞, ∞).

In the next step we need to find out whether the expressions are positive or negative in each interval. A table will help us:

x(−∞,−12)[−12,1](1,∞)4x+2−++x−1−−+

A minus sign − means that the expression is negative in that interval, and a plus sign + means that it is positive. How did we work this out? We substituted any number from the interval. In the middle interval, for example, we could substitute zero, which is the easiest to calculate. Then for 4x + 2 we get 4 · 0 + 2 = 2 and for x − 1 we get 0 − 1 = −1.

Tip: if an expression is negative in the first interval and positive in the next, it will be positive in any further intervals too. A linear function cannot change sign twice – see the graph of a linear function above.

At this point we know in which intervals which expressions are positive or negative. Our further working has to be split into three steps, because we must solve separately in each interval.

The first interval, that is, x is taken from (−∞,−12). In this interval both expressions are negative, so to remove the absolute value both expressions must change sign. In this interval we therefore solve the equation:

−(4x+2)−(x−1)=6

We simply solve this equation using equivalent steps:

−(4x+2)−(x−1)=6−4x−2−x+1=6−5x−1=6−5x=7x=−75

Watch out: we have to check whether the solution lies in the interval we are working in. We are assuming that x is taken from the interval (−∞,−12), so if we got a solution that is not in that interval, we could not use it. Minus seven fifths lies in the interval (−∞,−12), so this is a valid solution of the equation.

The second interval, that is, x is taken from [−12,1]. In this interval the expression 4x + 2 is positive and the expression x − 1 is still negative. We therefore solve the equation

4x+2−(x−1)=6

Again we simplify:

4x+2−(x−1)=64x+2−x+1=63x+3=63x=3x=1

Is the solution in the interval we are working in? Yes, it is. We have found another solution of the linear equation.

The third interval, that is, the interval (1, ∞). In this interval both expressions are positive, so we can remove the absolute value without any further change. We therefore solve the equation:

4x+2+x−1=6

This equation is easy to solve:

4x+2+x−1=65x+1=65x=5x=1

We got another result, the same as in the previous interval. But is this a valid solution for the interval we are working in? No! We are working in the open interval (1, ∞), and one is not part of this interval, so we cannot count the solution found in this third step among the valid solutions.

The linear equation with absolute value has two solutions, K={−75,1}.

The graphical solution

Just like an ordinary linear equation, this one can be solved graphically too. On the left we have the function f(x) = |4x + 2|+|x − 1| and on the right g(x) = 6. We draw these two graphs – they meet at two points. The x-coordinates of these points are the solutions of the equation.

The graphs of the functions f(x)=|4x+2|+|x-1| and g(x)=6

The solution set K therefore contains the values K={−75,1}.

Chapters: Linear equations, Linear equations with the unknown in the denominator, Linear equations with absolute value, Linear equations with a parameter