Linear inequalities

Linear inequalities are solved with similar modifications as when you calculate an ordinary linear equation. A linear inequality usually has the following form: ax + b>0 (or less than, greater than, and less than or equal to). Now all you have to do is modify the inequality to the following form and you have the result: x>−b/a. Of course, we assume that a≠0.

An ordinary linear inequality

A linear inequality can be solved by equivalent modifications of inequalities.

  • A simple example might look like this:

    $$ 3x + 9 > 3 $$

    First, we move all expressions without an unknown to the right-hand side. So we add the number −9 in the inequality to get the inequality:

    $$\begin{eqnarray} 3x + 9 - 9 &>& 3 - 9\\ 3x &>& -6 \end{eqnarray}$$

    Then we divide the whole inequality by three:

    $$\begin{eqnarray} 3x/3 &>& -6/3\\ x &>& -2 \end{eqnarray}$$

    This is the result of the whole inequality. The inequality has solutions for all x > −2.

    We could also solve the inequality graphically. Given an inequality 3x + 9 > 3, we draw graphs of two functions - the left and right sides of the inequality. We get the functions f(x) = 3x + 9 and g(x) = 3. Their graphs look like this:

    Graphs of the functions f(x) = 3x + 9 and g(x) = 3

    We can see that these graphs intersect at a point x1, which has x-coordinate just −2. We can also see that for all x > x1, that is, for all x of the interval (−2, ∞), the red function 3x + 9 is "above" the blue function 3 (here "above" in the sense of "has a larger y-coordinate"). Which agrees with the result we just calculated.

  • Sometimes it's handy, if you have too many minus times there, to multiply the whole inequality minus one. In this case, in addition to the values of the inequality itself, you also have to reverse the sign - make greater than less than and vice versa:

    $$\begin{eqnarray} -x&<&-10\quad /\cdot(-1)\\ x&>&10 \end{eqnarray}$$

    This, of course, applies whenever you multiply the whole inequality by any negative number. So one more quick example:

    $$\begin{eqnarray} -3x+8&<&2x-7\\ -5x&<&-15\qquad /\cdot \left(-\frac15\right)\\ x&>&3 \end{eqnarray}$$

    In the first step, we normally add to the inequality −2x, so we move all expressions with a variable to the left-hand side. At the same time, we subtract an octal, moving the constants to the right side. Then we just multiply the whole inequality $-\frac15$.

    To illustrate, see the graphical solution to the inequality, where we plot the two functions f(x) = −3x + 8 and g(x) = 2x − 7.

    Graphs of the functions f(x)=-3x+8 and g(x)=2x-7

    We can see that the red graph of the function −3x + 8 is below the blue graph of the function 2x − 7 whenever x > 3.

The variable in the denominator

Linear inequalities that contain fractions with a variable in the denominator are solved in a slightly more complicated way. An example is the inequality:

$$ \frac{2}{x}+3>4 $$

We cannot multiply an inequality by the unknown in the denominator because we do not know its sign. This is because if the value of the variable were negative, then we would have to reverse the sign of the inequality. Therefore, we can't afford to just multiply the inequality by the variable in the denominator. It would not be an equivalent treatment of inequalities.

We start to modify the inequality to get one fraction on the left side and zero on the right side. So first we add −4 to the inequality, this gives us the form:

$$\begin{eqnarray} \frac{2}{x}+3>4\\ \frac{2}{x}-1>0 \end{eqnarray}$$

Now we need to convert the expression on the left side into one fraction. So we multiply the number −1 by the fraction $\frac{x}{x}$, which converts both expressions to common denominators, and then we just add the fractions:

$$\begin{eqnarray} \frac{2}{x}-1&>&0\\ \frac{2}{x}-\frac{x}{x}&>&0\\ \frac{2-x}{x}&>&0\\ \end{eqnarray}$$

Now we are faced with the question - when is a fraction positive? A fraction is positive if both the numerator and denominator are positive, or if both the numerator and denominator are negative. If one is positive and the other is negative, then the fraction is negative. For example, if we have the fraction $\frac43$, then the whole fraction is a positive number. If we have the fraction $\frac{-3}{4}$, then the fraction represents a negative number. Then the fraction $\frac{-3}{-4}$ again represents a positive number because the minus sign is cancelled out. In general we can write:

$$\begin{eqnarray} \frac{kladné}{kladné}&=&kladné\\ \frac{kladné}{zaporné}&=&zaporné\\ \frac{zaporné}{kladné}&=&zaporné\\ \frac{zaporné}{zaporné}&=&kladné \end{eqnarray}$$

So we will have to solve two sets of inequalities. We start by finding when both the numerator and denominator are positive:

  1. For the numerator and denominator to be positive, both of these inequalities must hold simultaneously:

    $$2-x>0\qquad\wedge\qquad x>0$$

    For the first inequality, we just convert 2: to the other side and multiply −1:

    $$\begin{eqnarray} 2-x&>&0\\ -x&>&-2\\ x&<&2 \end{eqnarray}$$

    We have a solution to the first inequality. For the second inequality x > 0 there is nothing more to solve. At this point, we have to do the intersection of these solutions because we are interested in the cases where both solutions are valid at the same time, i.e., where the numerator is positive and the denominator is positive. The first solution can be written as an interval (−∞,2), the second solution can be written as an interval (0,∞). We now make the intersection of these intervals:

    $$\left(-\infty,2\right) \cap \left(0,\infty\right) = \left(0{,}2\right)$$

    This is another solution to the inequality. If you add the numbers from this interval, the inequality will hold. For example, if we substitute x = 1, which is a number from the interval (0,2), after x, we get the inequality $\frac{2}{1}+3 > 4$, which is equal to 5 > 4. Now it remains to investigate the case where both the numerator and denominator are negative.

  2. In the case where both the numerator and denominator are negative, we solve the inequalities:

    $$2-x < 0\qquad\wedge\qquad x<0$$

    Again, we just quickly solve the inequality 2 − x < 0:

    $$\begin{eqnarray} 2-x&<&0\\ -x&<&-2\\ x&>&2 \end{eqnarray}$$

    The second solution is again simply x < 0. We write in the intervals: (2,∞) and (−∞, 0) and do the intersection:

    $$ \left(2,\infty\right) \cap \left(-\infty, 0\right) = \emptyset $$

    We came up with an empty set. what does that mean? That the fraction $\frac{2-x}{x}$ can never have a negative numerator and a negative denominator.

We just combine the two previous results and get the resulting set S:

$$S=\left(0{,}2\right)\cup\emptyset=\left(0{,}2\right)$$

The inequality $\frac{2}{x}+3>4$ has solutions for all x of the interval (0,2). We can draw a graph to show the functions $f(x)=\frac{2}{x}+3$ and g(x) = 4:

Graph the functions f(x)={frac{2}{x}+3 and g(x)=4

We can see that the red graph of the function $f(x)=\frac{2}{x}+3$ is over the blue graph of the function g(x) = 4 just in the interval (0,2).

Linear inequalities with absolute value

A little more fun tends to be had with inequalities that contain an absolute value. This is because you have to calculate separately when the expression in the absolute value is positive and therefore the sign does not change, and when the expression is negative and the sign does change - essentially creating two inequalities in one. So a simple example:

$$\left|x + 5\right| < 12$$

First of all, we need to determine the zero point, which is the number that makes the entire expression equal to zero in absolute value and is used to determine the intervals in which the sign changes and in which it does not. So the first thing we do is solve the equation

$$x+5=0$$

We see that the result is x = −5. This result divides the value of x into two intervals. One in which the function x + 5 will take on positive values and one in which it will take on negative values. So we get negative numbers in the interval (−∞, −5) and positive or non-negative numbers in the interval <−5, ∞). To illustrate, the first line is the number from the first interval, the second from the second:

$$\begin{eqnarray} -8+5&=&-3\\ 13+5&=&18 \end{eqnarray}$$

What does this tell us? That if we put a value greater than minus five after x, then the absolute value will not change the result because x − 5 will be a positive number. Conversely, if the value of x is less than minus five, then the result of x − 5 will be negative and the absolute value will change it to positive. Therefore, we must distinguish between these two examples in the inequality.

Thus, we first calculate the result if we take x from the interval <−5, ∞). At this point, we do not change the sign because we just remove the absolute value.

$$\begin{eqnarray} x+5&<&12\\ x&<&7\\ x&\in&\left(-\infty, 7\right) \end{eqnarray}$$

We almost have the first solution. In fact, we still have to make an intersection with the interval from which we are currently taking x. We are moving in the interval <−5, ∞), so the result of this linear inequality cannot be, for example, x = −15, because it does not fall in our interval. So we have to make an intersection:

$$\left<-5, \infty\right)\cap(-\infty, 7)=\left<-5{,}7\right)$$

This is the first result. Now we have to calculate the result in the case where we take x from the interval (−∞, −5). In this interval, the absolute value changes sign. If we want to remove the absolute value from the inequality, we have to arrange the sign change ourselves, i.e., we multiply the expression under the absolute value by −1, thus changing the sign of the expression. So we rewrite it like this:

$$\begin{eqnarray} \left|x+5\right|&<&12\\ -(x+5)&<&12\\ -x-5&<&12 \end{eqnarray}$$

Add 5 to the inequality:

$$-x<17$$

And multiply by −1:

$$x>-17$$

This gives us the result:

$$x\in(-17,\infty)$$

But again, as before, we pick the value x from the interval (−∞, −5), so we still have to do the intersection of that interval with our result:

$$(-17,\infty)\cap(-\infty, -5)=(-17,-5)$$

Now we have both results, which we just concatenate:

$$x\in\left<-5{,}7\right)\cup(-17,-5)=(-17{,}7)$$

To check, we can look at the graphs of these functions:

graphs of functions

A few more words on when to use the closed and open interval. If we have a sharp inequality, i.e. x>0, we use the open interval because x cannot equal zero. If we don't have a sharp inequality x≥0, we use a closed interval because x can equal zero. For example, if you plug x = 7, which is not "tightly" contained in the solution to the inequality we just solved, you get:

$$\begin{eqnarray} \left|x+5\right|&<&12\\ (7+5)&<&12\\ 12&<&12 \end{eqnarray}$$

The inequality does not hold, 12 is not less than 12.