You have 24 dollars for a class party. Bags of chips cost 2 dollars and bottles of juice cost 3 dollars. If you buy bags and bottles, you spend dollars. Spending exactly 24 dollars gives the equation , and its graph is a line. But you are allowed to spend less, so every combination with works, and those combinations fill a whole region on one side of the line. Meanwhile, a rectangle with an area of 24 square centimetres can be 1 by 24, 2 by 12, 3 by 8 or 4 by 6: length times width is fixed, , and that graph is not a line at all. This lesson collects these special equations, shows the quickest way to graph each one, and shows how to shade the region for an inequality.
Vertical and horizontal lines: x = k and y = k
The equation says nothing about , so can be anything, but must be : the points , , all work. Together they form a vertical line crossing the -axis at . Its run between any two points is , so its slope is undefined. The equation fixes and lets vary, giving a horizontal line through with slope . Two special cases are worth remembering: is the -axis itself, and is the -axis.
Sums and differences: x + y = k and x − y = k
The points on are pairs of numbers that add to 10, like 7 right answers and 3 wrong answers on a 10-question quiz: , , . Solving for gives , so every line has slope and crosses both axes at . The points on are pairs whose difference is 3, like and . Solving for : subtract from both sides to get , then multiply by to get . So every line has slope and -intercept . Note the sign: the -intercept of is , not .
ax + by = k: graphing with intercepts
An equation like is in standard form, . The fastest way to graph it uses the two intercepts. On the -axis , so and the -intercept is . On the -axis , so and the -intercept is . Plot both points and draw the line through them. If you want the slope, rearrange: , so . This shortcut needs two different intercepts. If (as in ), both intercepts are the origin, so find a second point by choosing another . If the line is horizontal, and if it is vertical.
xy = k: a curve, not a line
The points on are pairs that multiply to 6: , , , , and also and . Solving for gives . When doubles, halves, so equal steps in do not give equal changes in : for the -values have first differences and . The relation is non-linear, and its graph is a curve. The value is impossible, because , never 6, so the curve never touches the -axis; in the same way it never touches the -axis. Negative pairs such as also multiply to 6, which gives a second, separate branch. (When is negative, as in , the two branches sit in the other two quadrants.) In a context like a rectangle's length and width, only the positive branch makes sense.
Inequalities: shading a region
An inequality such as is true for a whole region of points, not just a line. To graph it: (1) graph the boundary, the line you get by replacing the inequality sign with ; (2) draw it solid if the sign is or (points on the line count) and dashed if it is or (they do not); (3) pick a test point that is not on the line, often , and substitute it; (4) if the test point makes the inequality true, shade its side of the line; if false, shade the other side. For , the test gives , which is true, so you shade the side containing the origin.
| Inequality | Boundary | Test point result | Shade |
|---|---|---|---|
| Solid vertical line x = 2 | (0, 0): 0 ≥ 2 is false | Right of the line | |
| Dashed horizontal line y = −1 | (0, 0): 0 < −1 is false | Below the line | |
| Solid line through (5, 0) and (0, 5) | (0, 0): 0 ≤ 5 is true | The side containing the origin | |
| Dashed line through (2, 0) and (0, −2) | (0, 0): 0 > 2 is false | The side away from the origin | |
| Solid line through (3, 0) and (0, 2) | (0, 0): 0 ≥ 6 is false | The side away from the origin |