Sub topic 3
Graphing a Solution Set on a Number Line
This chapter assumes you can order real numbers on a number line and that you know what a solution set is (the set of all numbers that make an inequality true). You do not need to solve anything yet. The goal is to turn an inequality that is already solved, such as x < -2, into a picture, and to read a picture back into an inequality.
Why graph a solution set
A solution set for a linear inequality usually has infinitely many members. You cannot list them, so you need a compact way to show them all. A number line graph does this with three pieces of information:
- Where the set stops: the endpoint, or boundary value.
- Whether the endpoint belongs to the set: shown by an open or a closed circle.
- Which way the set extends: shown by shading and an arrow.
The three parts of a graph
The endpoint and its circle
Every graph of a one-variable linear inequality is anchored at a boundary value. This is the number where the inequality would become an equation. For x < -2 the boundary is -2.
The symbol decides how you draw the endpoint:
| Symbol | Meaning | Endpoint included? | Circle |
|---|---|---|---|
| < | less than | no | open |
| > | greater than | no | open |
| ≤ | less than or equal to | yes | closed (filled) |
| ≥ | greater than or equal to | yes | closed (filled) |
An open circle says "up to this number, but not including it." A closed circle says "including this number."
The shading and the arrow
Shade every point that satisfies the inequality. Shading that goes on forever is marked with an arrowhead at the edge of the line. A solution set such as x < -2 has no left end, so the shading runs left with an arrow.
Reading direction correctly
Direction is the most common source of mistakes, so use this rule: write the inequality with the variable on the left, then shade toward the side that the symbol describes.
- x < c or x ≤ c: shade to the left, toward smaller numbers.
- x > c or x ≥ c: shade to the right, toward larger numbers.
If the variable is on the right, flip the whole statement first. The inequality 3 > x says the same thing as x < 3. Read "3 is greater than x" as "x is less than 3," then graph x < 3.
Text drawings of the three basic graphs
In the drawings below, o is an open circle, * is a closed circle, = is shaded, and the arrowhead marks the direction the set continues. Each label sits directly under the tick mark it describes.
The graph of x < -2 has an open circle at -2 and shades left:
<=========o----+----+----+----+---->
-4 -3 -2 -1 0 1 2The graph of x ≥ 1 has a closed circle at 1 and shades right:
+----+----+----+----+----*====>
-4 -3 -2 -1 0 1Notice that the first graph contains none of the numbers -2, -1, 0, 1, 2. The second contains 1 and everything above it.
Graphs with two endpoints
A compound inequality such as -2 ≤ x < 3 has two boundaries, so its graph has two circles and a shaded segment between them. Here the left endpoint is closed because of ≤, and the right endpoint is open because of <:
+----*========================o----+
-3 -2 -1 0 1 2 3 4There are no arrows because the set has finite ends. A segment like this is a bounded set. A set with an arrow is unbounded in that direction.
The segment form works when the two conditions are joined by "and," so only the overlap is shaded. Chapters on compound inequalities extend this to "or" graphs with two separate shaded pieces.
A decision procedure you can apply every time
The flowchart gives a consistent order of steps for turning any solved inequality into a graph.
Encoding the rules in code
The two decisions in the flowchart are independent: circle type depends only on whether the symbol includes equality, and direction depends only on whether it is a less-than or greater-than symbol. A short program makes that independence explicit.
CIRCLE = {"<": "open", "<=": "closed", ">": "open", ">=": "closed"}
DIRECTION = {"<": "left", "<=": "left", ">": "right", ">=": "right"}
def graph_plan(symbol, boundary):
"""Describe the graph of 'x <symbol> boundary'."""
return (
f"Put a {CIRCLE[symbol]} circle at {boundary} "
f"and shade to the {DIRECTION[symbol]}."
)
for symbol, boundary in [("<", -2), ("<=", -2), (">", 1), (">=", 1)]:
print(f"x {symbol} {boundary}: {graph_plan(symbol, boundary)}")Running it prints one instruction per inequality. The first line is x < -2: Put a open circle at -2 and shade to the left. The grammar "a open" is a quirk of the template, not a mathematical issue.
Reading a graph back into an inequality
Going from a picture to an inequality uses the same rules in reverse:
- Find the endpoint or endpoints and note the number at each.
- A closed circle means ≤ or ≥. An open circle means < or >.
- If the shading goes left of the endpoint, the variable is less than the boundary. If it goes right, the variable is greater.
- For a bounded segment, write the smaller endpoint first, then x, then the larger endpoint: a ? x ? b.
For example, a segment with an open circle at -1 and a closed circle at 4 reads -1 < x ≤ 4.
Edge cases and common errors
- Using the wrong circle at an included endpoint. The inequality x ≤ 4 includes 4. An open circle would wrongly exclude it. When you check an answer, substitute the boundary value into the original inequality. If it makes the statement true, the circle must be closed.
- Shading the wrong way after dividing by a negative number. Solving -3x + 5 > 11 gives x < -2, not x > -2. Graph the final reversed inequality, not an intermediate step.
- Graphing the boundary but forgetting the arrow. Without an arrowhead, a reader may think the set stops at the edge of your drawing.
- Treating the circle as a point of the graph's interior. The circle marks the boundary only. The numbers on either side of it are what decide the direction.
- Mixing up a compound "and" segment with an "or" graph. The segment -2 ≤ x < 3 is one connected piece. A graph with two separate arrows pointing away from each other is an "or" statement, such as x < -2 or x ≥ 3.
Worked example from solved form to graph
Suppose you have solved an inequality and reached -2 ≤ x < 3.
- The left boundary is -2 and the symbol is ≤, so the circle at -2 is closed.
- The right boundary is 3 and the symbol is <, so the circle at 3 is open.
- Shade between them and draw no arrows, because the set is bounded.
You can confirm the graph by testing values. The number -2 satisfies -2 ≤ -2 and -2 < 3, so it is included. The number 3 fails 3 < 3, so it is excluded. The number 0 passes both parts and lies in the shaded segment. The number 5 fails x < 3 and lies outside.
Exercise
Describe the graph of 4 ≥ x. Give the type of circle, its location, and the direction of shading.
Show answer
Rewrite 4 ≥ x as x ≤ 4. The symbol includes equality, so draw a closed circle at 4. The symbol is a "less than" form, so shade to the left and add an arrow pointing left.
Exercise
A graph shows an open circle at -1, a closed circle at 4, and shading between them with no arrows. Write the inequality, then say whether 4 and -1 are in the solution set.
Show answer
The inequality is -1 < x ≤ 4. The number 4 is in the set because of the closed circle. The number -1 is not in the set because of the open circle.