Math
algebraeasy~20 min

Graphing Linear Equations

You will be able to read the slope and y-intercept straight off an equation, compute slope as rise over run from any two points, plot a line from its equation in under a minute, find both intercepts by substitution, recognize horizontal and vertical lines and their special slopes, and convert a line written as Ax + By = C into slope-intercept form without losing a sign.

Introduction

A linear equation is any equation whose graph is a straight line, and a straight line is the simplest picture in all of algebra: it never bends, so once you know its steepness and one point on it, you know every point on it. That is why linear questions feel repetitive once you understand them. Every one of them asks you to find the steepness, called the slope, or a location, usually the point where the line crosses an axis, and then to write or read the equation that packages those two facts together.

On the digital SAT, lines are the backbone of the Algebra domain, which is tied with Advanced Math as the largest slice of the math section. You will be handed an equation and asked for its graph, handed two points and asked for its equation, or handed a graph and asked which equation matches. The ACT asks the same questions and adds a few about horizontal and vertical lines and about what the slope of a line looks like when the equation is not written in the friendly y = mx + b form.

This lesson is the foundation. It covers what slope means, why rise over run is the same number no matter which two points you pick, how the form y = mx + b lets you sketch a line instantly, how to find where a line crosses each axis, and how to untangle an equation like 2x - 3y = 6. The follow-up lesson on linear functions builds on this to handle rates of change in word problems, parallel and perpendicular lines, and the other forms of a line, so if a question asks what a slope means in dollars per hour, that is where you will find it.

Game plan

How to attack these questions on test day.
  1. 1

    Get the equation into y = mx + b before you read anything off it

    The slope is the coefficient of x and the intercept is the constant term, but only once y is alone on the left. In y = 4 + 3x the slope is 3 and the intercept is 4, not the other way around, because 3 is the number multiplying x. In 2x - 3y = 6 neither 2 nor -3 is the slope until you solve for y. Rewrite first, then read; it takes ten seconds and it removes the most common wrong answer from the board.

  2. 2

    Two points draw a line, and intercepts are the fastest two

    You never need more than two points to graph a line. When the equation is in slope-intercept form, start at (0, b) and use rise over run to step to a second point. When the equation is in the form Ax + By = C, set x = 0 to get the y-intercept and y = 0 to get the x-intercept; each substitution kills one term and leaves a one-step equation. Whichever route you take, check a third point before you trust the picture.

  3. 3

    Count slope from a graph by choosing lattice points

    When a question shows you a line on a grid, find two points where the line passes exactly through a grid intersection. Count the vertical change between them first, then the horizontal change, and decide the sign by looking: a line that rises as you move right has positive slope, one that falls has negative slope. Counting from a point that is not exactly on a grid crossing is the source of nearly every misread slope.

  4. 4

    Match the special cases to their equations instantly

    An equation with no x in it, like y = 3, is a horizontal line: every point has the same y-value, so the rise is always zero and the slope is zero. An equation with no y in it, like x = -2, is a vertical line: every point has the same x-value, so the run is zero and the slope is undefined. Test writers know students mix these up, so when you see one, ask which coordinate is being held fixed and picture the line before you answer.

  5. 5

    On the digital SAT, let the built-in calculator draw the line

    The Desmos calculator inside the digital SAT graphs any equation you type, including ones in the form Ax + By = C, and clicking on the graph reveals the intercepts. Use it to confirm which answer choice matches a described graph, or to check an equation you built from two points by typing it in and seeing whether both points land on the line. The ACT allows your own calculator, so the same tactic applies if yours can graph.

Theory

A linear equation in two variables describes a straight line in the xy-plane, and the connection between the equation and the picture is exact in both directions. Every pair (x, y) that makes the equation true is a point on the line, and every point on the line is a pair that makes the equation true. The reason the graph is straight rather than curved is that y changes by the same amount every time x increases by one. That constant change is the single most important number attached to a line, and it is called the slope.

Slope is written m and defined as rise over run: the vertical change between two points on the line divided by the horizontal change between them. For two points (x₁, y₁) and (x₂, y₂), the formula is m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}. The order of the points does not matter as long as you subtract in the same order on top and bottom, because swapping both differences flips both signs and the ratio is unchanged. What makes slope useful is that it does not depend on which two points you pick. Any two right triangles drawn under the same line, with the line as hypotenuse and legs parallel to the axes, are similar triangles, so their vertical leg divided by their horizontal leg is always the same ratio. The sign of the slope tells you the direction at a glance: a positive slope rises from left to right, a negative slope falls from left to right, a slope of zero is perfectly flat, and a vertical line has no slope at all because its run is zero and you cannot divide by zero.

Slope-intercept form, y = mx + b, is the form you should aim for whenever you want to graph or to read features off a line. The letter m is the slope and the letter b is the y-intercept, the y-value where the line crosses the vertical axis. You can see why b is the intercept by substituting x = 0: the mx term disappears and y = b, so the point (0, b) is on the line. To plot from this form, put a dot at (0, b), then use the slope as directions: from that dot, move up by the rise and right by the run to land on a second point. For y = (3/2)x - 3 you start at (0, -3), rise 3 and run 2 to reach (2, 0), and again to reach (4, 3). If you prefer, make a small table by choosing three or four x-values, computing each y, and plotting the pairs; the points will fall in a straight line if the arithmetic is right, which is a built-in check.

A line has two intercepts, and each is found by setting the other variable to zero. The y-intercept is the value of y when x = 0, and the x-intercept is the value of x when y = 0. In y = mx + b the y-intercept is simply b, while the x-intercept comes from solving 0 = mx + b, which gives x = -b / m. This is also the solution of the equation mx + b = 0, so the x-intercept of a line and the solution of the corresponding one-variable equation are the same number seen two ways, a fact both tests exploit. Intercepts are the quickest pair of points for graphing an equation like 2x - 3y = 6, because substituting zero for one variable wipes out an entire term.

Two families of lines break the usual pattern. A horizontal line has the equation y = k for some constant k: every point on it has the same y-value, so between any two of its points the rise is zero and the slope is zero. Its equation fits y = mx + b with m = 0 and b = k. A vertical line has the equation x = h: every point has the same x-value, so the run between any two points is zero and the slope is undefined. A vertical line cannot be written in the form y = mx + b at all, because no single output y goes with the input x = h, which is also why a vertical line is not the graph of a function. The quickest way to keep them straight is to notice which variable is missing: the missing variable is the one that is free to take any value.

Many test questions hide the slope by writing the line in standard form, Ax + By = C. To convert, solve for y: subtract Ax from both sides to get By = -Ax + C, then divide every term by B to get y = (-A / B)x + C / B. The slope is therefore AB-\frac{A}{B} and the y-intercept is C / B. For 2x - 3y = 6, subtracting 2x gives -3y = -2x + 6, and dividing by -3 gives y = (2/3)x - 2, so the slope is 2/3 and not 2, -3, or -2/3. The division by a negative B is where the sign errors happen, so divide every term, including the constant, and check by substituting the intercepts back into the original. Two quick facts you will meet again in the next lesson: lines with the same slope are parallel, and lines whose slopes multiply to -1 are perpendicular. Everything about what a slope means in a word problem also lives there.

In the interactive graph below, drag the slope slider m and watch the line pivot around its y-intercept while the marker on the x-axis slides along: a bigger positive m tilts the line steeper uphill, a negative m flips it to run downhill, and m = 0 flattens it into a horizontal line with no x-intercept at all. Then drag b and watch the whole line slide up and down without changing its tilt. Try setting m = 1.5 and b = -3 and confirm the readouts match the line in the first figure.

Worked figures

Slope is rise over run between any two points

Moving from (0, -3) to (4, 3) along the line y = (3/2)x - 3, you run 4 units to the right and rise 6 units, so the slope is 6/4 = 3/2. Picking a different pair of points, such as (0, -3) and (2, 0), gives 3/2 = 3/2 again, because every rise-run triangle under a line has the same proportions.

Figure 1
-22468-6-4-2246y = (3/2)x - 3run = 4rise = 6(0, -3)(4, 3)m = 6 / 4 = 3/2

Plotting a line from its equation with a value table

Choose a few x-values, substitute each into y = 2x - 1, and plot the pairs. Each step of 1 in x adds exactly 2 to y, which is the slope, and the row with x = 0 gives the y-intercept -1. Any two of these points are enough to draw the line; the rest confirm it is straight.

Table 1
x2x - 1yPoint to plot
-22(-2) - 1 = -5-5(-2, -5)
-12(-1) - 1 = -3-3(-1, -3)
02(0) - 1 = -1-1(0, -1)
12(1) - 1 = 11(1, 1)
22(2) - 1 = 33(2, 3)
32(3) - 1 = 55(3, 5)

The two intercepts of a line

For y = -(3/4)x + 3, setting x = 0 gives the y-intercept (0, 3), and setting y = 0 gives 0 = -(3/4)x + 3, so x = 4 and the x-intercept is (4, 0). Those two points fix the whole line; the point (8, -3) is just another rise-run step of down 3 and right 4 along it.

Figure 2
-4-20246-20246810y-intercept (0, 3)x-intercept (4, 0)(8, -3)xy
  • y = -(3/4)x + 3

Same intercept, four different slopes

All four lines pass through (0, 1), so b = 1 for each, and only m changes. The slope 2 line is steeper than the slope 1/2 line, the slope 0 line is horizontal, and the slope -2 line falls as it moves right. The dashed line x = 3 is vertical: every point on it has x = 3, its run is zero, and its slope is undefined, so it cannot be written as y = mx + b.

Figure 3
-8-6-4-20246810-5-4-3-2-1012345x = 3(0, 1)xy
  • y = 2x + 1 (m = 2)
  • y = (1/2)x + 1 (m = 1/2)
  • y = 1 (m = 0)
  • y = -2x + 1 (m = -2)

The four kinds of slope

Read the direction of a line from the sign of its slope. The two special cases are the ones with a missing variable: no x in the equation means horizontal, no y in the equation means vertical.

Table 2
SlopeExample equationTwo points on itHow the graph looks
Positive (m = 2)y = 2x - 1(0, -1) and (1, 1)rises from left to right
Negative (m = -3)y = -3x + 2(0, 2) and (1, -1)falls from left to right
Zero (m = 0)y = 4(0, 4) and (5, 4)horizontal: no rise at all
Undefinedx = -2(-2, 0) and (-2, 3)vertical: no run, so rise/run divides by zero

Try it yourself

m (slope)1.5
b (y-intercept)-3
Equation
y = 1.5x - 3
Slope
1.5
y-intercept
(0, -3)
x-intercepts
x = 2

Worked examples

Try each one before opening the solution.

Example 1: Graph a line in standard form using its intercepts

Graph the line 2x - 3y = 6 in the xy-plane, and state its slope.

2x - 3y = 6, which is y = (2/3)x - 2
-4-2024-2024681012x-intercept (3, 0)y-intercept (0, -2)check point (6, 2)xy
  • 2x - 3y = 6
Show solution
  1. Find the x-intercept by setting y = 0: 2x - 3(0) = 6, so 2x = 6 and x = 3. The point (3, 0) is on the line.

    Setting y to zero erases the whole y term, which is why intercepts are the fastest points to find in this form.

  2. Find the y-intercept by setting x = 0: 2(0) - 3y = 6, so -3y = 6 and y = -2. The point (0, -2) is on the line.

    Dividing 6 by -3 gives -2, not 2. Keep the sign of the coefficient.

  3. Plot (3, 0) and (0, -2) and draw the straight line through them, extending it in both directions.

    Two points determine a line, so the graph is now fixed.

  4. Compute the slope from the two intercepts: m = (0 - (-2)) / (3 - 0) = 2 / 3.

    Subtract the y-values in the same order you subtract the x-values.

  5. Confirm by solving for y: -3y = -2x + 6, so y = (2/3)x - 2, which shows the same slope 2/3 and the same intercept -2.

    Dividing every term by -3 flips both signs; forgetting the constant is the usual slip.

  6. Check a third point: x = 6 gives y = (2/3)(6) - 2 = 4 - 2 = 2, and 2(6) - 3(2) = 12 - 6 = 6, so (6, 2) satisfies the original equation.

Answer: The line passes through (3, 0) and (0, -2), its slope is 2/3, and its slope-intercept form is y = (2/3)x - 2.

Example 2: Write the equation of the line through two points

Find the equation, in slope-intercept form, of the line that passes through (-2, 7) and (4, -2).

Show solution
  1. Compute the slope: m = (-2 - 7) / (4 - (-2)) = -9 / 6 = -3/2.

    Subtracting a negative in the denominator makes it 4 + 2 = 6. The line falls to the right, so a negative slope is expected.

  2. Write the form with the slope filled in: y = (-3/2)x + b.
  3. Substitute the point (-2, 7) to find b: 7 = (-3/2)(-2) + b, so 7 = 3 + b.

    Either point works. Choose the one with the easier arithmetic.

  4. Solve for the intercept: b = 7 - 3 = 4.
  5. Check with the other point: at x = 4, y = (-3/2)(4) + 4 = -6 + 4 = -2, which matches (4, -2).

    If this check fails, the slope was wrong, not b, because b was computed to fit the first point.

  6. Read off the graph features: the line crosses the y-axis at (0, 4) and falls 3 units for every 2 units to the right.

Answer: y = (-3/2)x + 4

Example 3: Read slope and intercept from a described graph

In the xy-plane, a line crosses the y-axis at (0, 5) and passes through the point (4, -3). Write its equation and find the point where it crosses the x-axis.

y = -2x + 5
-4-202468-2-10123456(0, 5)x-intercept (2.5, 0)(4, -3)xy
  • y = -2x + 5
Show solution
  1. The y-intercept is given directly: the line crosses the y-axis at (0, 5), so b = 5.

    Any point with x = 0 is the y-intercept. No calculation needed.

  2. Count rise and run from (0, 5) to (4, -3): the rise is -3 - 5 = -8 and the run is 4 - 0 = 4.

    The rise is negative because the line drops as you move right.

  3. Divide: m = -8 / 4 = -2.
  4. Assemble the equation: y = -2x + 5.
  5. Find the x-intercept by setting y = 0: 0 = -2x + 5, so 2x = 5 and x = 5/2 = 2.5. The line crosses the x-axis at (2.5, 0).

    The x-intercept of y = mx + b is always -b / m, here -5 / (-2) = 2.5.

  6. Check the given point: at x = 4, y = -2(4) + 5 = -8 + 5 = -3, which matches (4, -3).

Answer: The equation is y = -2x + 5, and the line crosses the x-axis at (2.5, 0).

Practice

Check your understanding 1

In the xy-plane, a line passes through the points (-3, 2) and (5, -4). What is the slope of the line?

Check your understanding 2

What is the slope of the line whose equation is 4x + 6y = 12?

Check your understanding 3

The line y = 3x - 9 is graphed in the xy-plane. At which point does the line cross the x-axis?

Check your understanding 4

Which equation represents a horizontal line that passes through the point (4, -2)?

Check your understanding 5

A line in the xy-plane has y-intercept (0, -4) and passes through the point (2, 2). Which equation represents the line?

Common mistakes

Reading the slope from an equation that is not solved for y. In y = 4 + 3x the slope is 3, because the slope is whatever multiplies x, not whichever number is written first. In 4x + 6y = 12 the slope is -2/3, not 4, because the equation must be solved for y before anything can be read off. Make it a rule to rewrite the equation as y = mx + b before you identify either number.

Inverting rise and run. Slope is the change in y divided by the change in x, and computing the change in x divided by the change in y gives the reciprocal, which the test will list as a distractor. Say the words rise over run, or vertical over horizontal, as you write the fraction, and sanity check the size: a line that is steeper than 45 degrees has a slope bigger than 1 in absolute value, and a line that is flatter has a slope smaller than 1.

Subtracting in different orders on top and bottom. If you write y₂ - y₁ in the numerator you must write x₂ - x₁, using the same point as the second point both times. Mixing the orders flips the sign and turns an uphill line into a downhill one. Before computing, label one point as point 1 and the other as point 2, and check the sign against the picture: if the line rises to the right, the slope must be positive.

Confusing the two intercepts, or the two special lines. The y-intercept is found by setting x = 0 and lives on the vertical axis; the x-intercept is found by setting y = 0 and lives on the horizontal axis. A student who finds x = 3 as the x-intercept and then marks it on the y-axis has done the algebra right and the graph wrong. Likewise, y = 3 is horizontal because every point has height 3, while x = 3 is vertical because every point sits at horizontal position 3. Picture the line before you commit.

Dropping a sign while converting Ax + By = C. When B is negative, dividing by it changes the sign of every term. From 2x - 3y = 6, the step -3y = -2x + 6 becomes y = (2/3)x - 2, with a positive slope and a negative intercept. Students who divide by 3 instead of -3, forgetting the negative sign on B, end up with y = (-2/3)x + 2 and a graph tilted the wrong way. Substitute an intercept from the original equation into your final form to confirm the signs are right.