Compound inequalities: and, or
A number has to pass two tests at once, or pass at least one of two. Which numbers do?
Where you are 7 in Inequalities
When you reach for it
A single inequality fences the number line on one side: x > 3 is everything to the right of 3. Many real conditions fence it on two sides, or allow two separate stretches. Cold-water fish are safe while their tank stays at least 18 degrees and at most 25 degrees. A fairground ride turns away anyone who is too short or too tall. Two inequalities joined by “and” or by “or” make a compound inequality:
Each part is an ordinary linear inequality, solved with the moves of solving linear inequalities and two-step inequalities. What is new is how the two answers are put together, and that is decided entirely by the joining word.
The procedure
What “and” and “or” mean
A number satisfies “P and Q” exactly when it satisfies both parts. It satisfies “P or Q” when it satisfies at least one of them, and a number that satisfies both counts too: in mathematics “or” always allows both. So the solution set of an “and” is the overlap of the two solution sets, and the solution set of an “or” is everything either one covers. In the language of sets, “and” is the intersection \cap and “or” is the union \cup.
Solve each part, then combine
Solve each part on its own. Every step of solving an inequality (adding the same number to both sides, multiplying both sides by a positive number, multiplying by a negative number and reversing the sign) produces an inequality with exactly the same solutions. So replacing a part by its solved form does not change which numbers make the whole compound statement true.
Then put the two solution sets on number lines, one above the other, lined up so the same number sits in the same place on each. For “and”, keep only what is shaded on both lines. For “or”, keep everything shaded on either line. An endpoint belongs to an “and” answer only if both parts include it, and to an “or” answer if either part does.
Two rays can meet in only a few ways, and the picture shows which at a glance. If they point toward each other and overlap, “and” gives the stretch between the two boundaries and “or” gives the whole line. If they point away from each other, “and” gives nothing and “or” gives two separate rays. If they point the same way, one ray contains the other: “and” gives the shorter one and “or” the longer.
Three-part inequalities
The statement “x \ge -2 and x < 4” says that x is trapped between -2 and 4. It is written as a three-part inequality, -2 \le x < 4, read “x is at least -2 and less than 4”. The middle may be an expression:
means -3 < 2x + 1 and 2x + 1 \le 9. Both hidden inequalities share the same middle, so a move applied to all three parts is applied to both inequalities at once. Subtract 1 from all three parts:
Then divide all three parts by 2, a positive number, so neither sign changes:
The solution is every number greater than -2 and at most 4. Dividing all three parts by a negative number reverses both signs, because it reverses each of the two inequalities hidden inside, for the reason given in multi-step inequalities. The chain then reads from larger to smaller, as in 3 > x \ge -2; that says the same thing as -2 \le x < 3, and the usual form puts the smaller number on the left so that the chain matches the number line.
Writing the answer
The same solution set can be given as an inequality, as a picture on the number line, or in interval notation, where a parenthesis means the endpoint is left out, a square bracket means it is included, and \infty always takes a parenthesis because it is not a number that can be reached.
| As inequalities | In interval notation |
|---|---|
| -2 < x \le 4 | (-2, 4] |
| x < -3 or x \ge 4 | (-\infty, -3) \cup [4, \infty) |
| no number at all | \varnothing |
| every real number | (-\infty, \infty), also written \mathbb{R} |
Worked examples
An “and” with two parts
Solve 4x + 1 \ge -7 and 3x - 2 < 10. Show the solution on a number line and write it in interval notation.
SolutionSolve each part on its own. In the first, subtract 1 from both sides to get 4x \ge -8, then divide both sides by 4; it is positive, so the sign stays: x \ge -2. In the second, add 2 to both sides to get 3x < 12, then divide by 3: x < 4.
The joining word is “and”, so a number must satisfy both parts. On the picture that is where both lines are shaded: from -2, which both parts include, up to 4, which the second part leaves out.
In interval notation, [-2, 4). Check one number inside and the two ends. At x = 0: 1 \ge -7 and -2 < 10, both true. At x = -2: -7 \ge -7 and -8 < 10, both true, so -2 is in. At x = 4: 17 \ge -7 is true but 10 < 10 is false, and failing one part is enough to fail an “and”, so 4 is out.
An “or” with two parts
Solve 5 - 2x > 11 or 4x - 3 \ge 13.
SolutionIn the first part, subtract 5 from both sides: -2x > 6. Dividing by -2, a negative number, reverses the sign: x < -3. In the second part, add 3: 4x \ge 16, so x \ge 4.
The joining word is “or”, so keep everything shaded on either line. The two rays point away from each other and nothing joins them, so the answer has two pieces:
In interval notation, (-\infty, -3) \cup [4, \infty). No single three-part inequality can say this, since a chain describes one unbroken stretch. Check: at x = 0, 5 > 11 and -3 \ge 13 are both false, so 0 is not a solution, and on the picture 0 sits in the gap. At x = -5, 15 > 11 is true, which is already enough for an “or”, whatever the second part says.
A three-part inequality with a negative
Solve -11 < 1 - 4x \le 9.
SolutionThe unknown is only in the middle, so work on all three parts at once. Subtract 1 from all three:
Divide all three by -4. It is negative, so both signs reverse:
Read from right to left, this is -2 \le x < 3, or [-2, 3) in interval notation. Notice what happened to the included end. The \le beside 9 became a \ge beside -2: the end that was included is still included, it has only moved to the other side.
Check the ends in the original. At x = -2, 1 - 4x = 9, and -11 < 9 \le 9 is true. At x = 3, 1 - 4x = -11, and -11 < -11 is false. So -2 is in and 3 is out, as found. Splitting the chain into its two parts gives the same result: -11 < 1 - 4x becomes 3 > x, and 1 - 4x \le 9 becomes x \ge -2.
When the joining word changes everything
(a) Solve 2x - 1 > 7 and 3x + 2 < 5. (b) Solve x + 4 > 1 or 2x - 5 < 3.
Solution(a) The first part gives 2x > 8, so x > 4. The second gives 3x < 3, so x < 1. A number would have to be greater than 4 and at the same time less than 1, and none is.
The “and” has no solution: its solution set is the empty set \varnothing. Written as a chain it would be 4 < x < 1, which would need 4 < 1, another way to see that nothing fits.
(b) The first part gives x > -3 and the second gives 2x < 8, so x < 4. Take any real number. Either it is greater than -3, and the first part holds, or it is at most -3, and then it is certainly less than 4, so the second part holds. Every real number satisfies at least one part.
The “or” is true for every real number: (-\infty, \infty).
Swap the joining words and the answers change completely, though the parts do not. The parts of (a) joined by “or” give x < 1 or x > 4, two separate rays. The parts of (b) joined by “and” give -3 < x < 4. The joining word is part of the problem, not decoration.
A fish tank’s safe range
Primrose keeps cold-water fish in a tank that must stay between 18 and 25 degrees Celsius, both included. Her thermometer reads in degrees Fahrenheit. A Fahrenheit reading F is \displaystyle \frac{5(F - 32)}{9} degrees Celsius, as in converting Celsius and Fahrenheit. Which readings are safe?
Solution“Between 18 and 25, both included” means at least 18 and at most 25, a three-part inequality with the Celsius temperature in the middle:
Multiply all three parts by 9, which is positive, so the signs stay:
Divide all three by 5, then add 32 to all three:
Every reading from 64.4 to 77 degrees Fahrenheit is safe, [64.4, 77]. Check the ends: \displaystyle \frac{5(77 - 32)}{9} = \frac{225}{9} = 25 and \displaystyle \frac{5(64.4 - 32)}{9} = \frac{162}{9} = 18. Had the tank’s range left its ends out, every \le would have been a < and the answer would be (64.4, 77).
Too short or too tall
A ride lets on riders whose height h, in centimeters, satisfies 122 \le h \le 193. Describe the heights that are turned away.
SolutionA rider is let on when both h \ge 122 and h \le 193 hold. A rider is turned away when at least one of them fails, that is, when
The “and” became an “or”, and each part became its opposite: \ge became < and \le became >, so each endpoint switched from included to left out. A height of exactly 122 is let on, so it cannot be turned away. Writing “h < 122 and h > 193” would describe nobody, because no height is both. In interval notation the turned-away heights are (0, 122) \cup (193, \infty), since a height is positive.
Boundaries
A chain is only for “and”. A three-part inequality a < x < b is shorthand for “a < x and x < b”. An “or” whose answer is two separate rays has no chain form; it is written with “or” or with \cup.
A chain must point one way, with the smaller end on the left. “2 < x > 5” is not a three-part inequality: the two signs face opposite ways and say nothing about how 2 and 5 compare, so write it as “x > 2 and x > 5”, which is x > 5. A chain such as 6 < x < 2 is correctly formed but has no solutions, since it would need 6 < 2.
Working on all three parts needs the unknown only in the middle. In x < 2x + 1 < 5 no single move isolates x in all three parts at once. Split it: x < 2x + 1 gives x > -1, and 2x + 1 < 5 gives x < 2, so -1 < x < 2.
Only nonzero numbers may multiply or divide the parts. Multiplying by 0 turns every part into 0 and loses the inequality. Multiplying by an expression such as x is not allowed when its sign is unknown, because the sign decides whether the inequality reverses.
Equal boundaries come down to the endpoint. “x \ge 2 and x \le 2” holds for the single number 2; “x > 2 and x < 2” holds for none; “x \ge 2 or x < 2” holds for every number.
A context can narrow the answer further. If the unknown counts things it must be a whole number, and a height cannot be negative, which is why the turned-away heights in Example 6 start at 0.
Where this goes next
Absolute value inequalities are compound inequalities in disguise: |x - 5| < 2 says x is less than 2 away from 5, which is the “and” 3 < x < 7, while “more than 2 away” is an “or”. In two variables, the overlap of two shaded regions is the same “and”, drawn on a plane instead of a line. A piecewise function attaches a rule to each condition, such as 0 \le x < 2, and choosing the right branch means deciding which three-part inequality an input satisfies. Quadratic inequalities produce answers of exactly these two shapes: one stretch between the roots, an “and”, or two rays outside them, an “or”. And every answer here can be written in interval notation, which is how most later work states a solution set.
Exercises
“And”: keep the overlap
Solve each, and write the answer in interval notation.
- x + 5 > 2 and x - 1 \le 4
- 3y - 2 \ge 7 and 2y + 1 < 19
- 6 - a < 10 and 4a + 3 \le 23
- 2(m - 1) > m + 3 and 5m < 3m + 20
“Or”: keep everything either part covers
- x - 4 < -6 or x + 2 > 5
- 3n + 1 \le -8 or 9 - 2n < 1
- \displaystyle \frac{t}{2} \ge 3 or 5t + 4 < -11
Three-part inequalities
- -4 < x - 3 < 2
- 1 \le 3k + 4 \le 19
- -9 < 3 - 2p \le 7
- \displaystyle -2 \le \frac{2w + 1}{3} < 5
Nothing, everything, or one part decides
- 4x + 1 > 9 and x - 6 \ge -3
- 2x + 3 < 1 and 3x - 4 > 5
- 5 - x \le 2 or x + 7 < 12
From words and settings
- Three more than twice a number n is at least -5 and at most 11. Write this as a three-part inequality and find every possible n.
- Margery’s medicine syrup holds 25 mg of medicine in each milliliter. A dose must hold at least 150 mg and at most 250 mg. Write a three-part inequality for the volume v, in milliliters, and solve it.
- Nikolaj’s carry-on bag expands. It is 55 cm long and 35 cm wide, and its depth d, in centimeters, can be set. The airline needs the length, width and depth to add up to at most 115 cm, and his laptop needs a depth of at least 18 cm. Which depths work?
- Rosheen’s dough-rising cabinet beeps when its temperature T, in degrees Celsius, is below 24 or above 29. For which temperatures is the cabinet quiet? Write the answer as one three-part inequality.
Reasoning
- Oonagh writes the solution of “x < 2 or x > 6” as 6 < x < 2. Explain what 6 < x < 2 actually says, and why this “or” cannot be written as one three-part inequality.
- Explain why dividing all three parts of -6 < -3x \le 9 by -3 reverses both inequality signs, and solve it.
Answers
- -3 < x \le 5, that is (-3, 5]. The first part gives x > -3 and the second x \le 5; keep the overlap.
- 3 \le y < 9, that is [3, 9). 3y \ge 9 gives y \ge 3, and 2y < 18 gives y < 9.
- -4 < a \le 5, that is (-4, 5]. -a < 4; dividing by -1 reverses the sign, so a > -4. 4a \le 20 gives a \le 5.
- 5 < m < 10, that is (5, 10). Expand: 2m - 2 > m + 3, so m > 5. 2m < 20 gives m < 10.
- x < -2 or x > 3, that is (-\infty, -2) \cup (3, \infty). Add 4 in the first part and subtract 2 in the second.
- n \le -3 or n > 4, that is (-\infty, -3] \cup (4, \infty). 3n \le -9 gives n \le -3. -2n < -8; dividing by -2 reverses the sign, so n > 4.
- t < -3 or t \ge 6, that is (-\infty, -3) \cup [6, \infty). Multiply the first part by 2: t \ge 6. 5t < -15 gives t < -3.
- -1 < x < 5, that is (-1, 5). Add 3 to all three parts.
- -1 \le k \le 5, that is [-1, 5]. Subtract 4 from all three parts: -3 \le 3k \le 15. Divide all three by 3.
- -2 \le p < 6, that is [-2, 6). Subtract 3: -12 < -2p \le 4. Divide all three by -2 and reverse both signs: 6 > p \ge -2.
- \displaystyle -\frac{7}{2} \le w < 7, that is \displaystyle \left[-\frac{7}{2}, 7\right). Multiply all three parts by 3: -6 \le 2w + 1 < 15. Subtract 1: -7 \le 2w < 14. Divide by 2.
- x \ge 3, that is [3, \infty). The parts give x > 2 and x \ge 3. Both rays point right, and every number at least 3 is also greater than 2, so the overlap is the shorter ray.
- No solution, \varnothing. The parts give x < -1 and x > 3, rays pointing away from each other, and no number is both.
- Every real number, (-\infty, \infty). -x \le -3 gives x \ge 3, and the second part gives x < 5. A number less than 3 is less than 5, and every other number is at least 3, so each number satisfies at least one part.
- -5 \le 2n + 3 \le 11, so -4 \le n \le 4. Subtract 3 from all three parts: -8 \le 2n \le 8. Divide by 2.
- 150 \le 25v \le 250, so 6 \le v \le 10: any dose from 6 to 10 milliliters. Divide all three parts by 25.
- 18 \le d \le 25. The laptop needs d \ge 18, and the airline needs 55 + 35 + d \le 115, that is d \le 25. Both must hold, so this is an “and”.
- 24 \le T \le 29. The cabinet is quiet when its condition fails, which needs both parts of the “or” to fail: T < 24 is false, so T \ge 24, and T > 29 is false, so T \le 29.
- 6 < x < 2 means x > 6 and x < 2. No number is both greater than 6 and less than 2, so it has no solutions at all, while “x < 2 or x > 6” has infinitely many. A three-part inequality always describes one unbroken stretch between its two ends; the “or” here is two separate rays with a gap from 2 to 6, so it can only be written with “or”, or as (-\infty, 2) \cup (6, \infty).
- -3 \le x < 2. The chain is two inequalities, -6 < -3x and -3x \le 9. Dividing both sides of an inequality by a negative number reverses the order of the two sides, since it mirrors the number line about 0 and the larger number becomes the smaller. Each of the two hidden inequalities is divided by -3, so each sign reverses: 2 > x \ge -3, which reads -3 \le x < 2.