Knowledge Hub · Article 344 · Maths

Graphing linear equations: the four methods (a table of values, slope-intercept y = mx + b, the two intercepts from Ax + By = C, and point-slope), worked examples of each, horizontal and vertical lines, how to read slope and intercept from a graph, parallel and perpendicular lines, the mistakes, and a printable sheet with blank grids and practice

0min read0students taught0countries
Article 344 · Maths

"Graphing linear equations" is searched about 3,700 times a month in the United States, by Grade 8 and Algebra 1 students and by the parents who last did it decades ago, and the same skill is "drawing straight-line graphs" in UK, Australian and Indian classrooms. There are four standard methods, and a child who can do all four can graph any linear equation in under a minute. This page gives each method with a worked example, the horizontal and vertical special cases, reading slope and intercept from a drawn line, parallel and perpendicular lines, the mistakes, and a printable sheet with blank grids and practice. The grid itself is explained on our coordinate grid page.

Download the graphing sheet with blank grids and practice (PDF) (A4, the four methods with worked examples on page 1, six blank grids and the practice set with answers on page 2, free).

The one fact underneath

A linear equation in x and y (no powers, no products of variables) graphs as a straight line, and two points determine a line. So graphing is finding two points on the line and joining them. Every method below is a way of finding points fast; a third point is the check that the first two were right.

Method 1: a table of values

Works for every equation. Choose three values of x (usually −1, 0, 1, or 0, 1, 2), substitute, compute y, plot the pairs, join.

y = 2x − 3

x −1 0 1 2
y −5 −3 −1 1

Points (−1, −5), (0, −3), (1, −1), (2, 1). They line up (each step right adds 2 to y); draw the line through them. If a point is off the line, recompute it.

Choose x-values that make y a whole number: for y = ½x + 1, use even x (−2, 0, 2, 4).

Method 2: slope-intercept form, y = mx + b

The fastest method when the equation is solved for y. m is the slope, b the y-intercept.

  1. Plot (0, b) on the y-axis.
  2. Write m as a fraction: rise over run. 2 is 2/1; −¾ is down 3, right 4; ½ is up 1, right 2.
  3. From (0, b), move the rise (up for positive, down for negative) and the run (right), plot. Repeat once more.
  4. Join with a ruler, arrows at both ends.

y = −¾x + 2: start (0, 2); down 3, right 4 → (4, −1); again → (8, −4). Or go backwards: up 3, left 4 → (−4, 5).

If the equation is not solved for y, rearrange it first: 2y = 6x − 4 → y = 3x − 2.

Method 3: the two intercepts (for Ax + By = C)

Standard form is quickest by intercepts, because setting one variable to 0 removes a term.

3x + 2y = 6

  • x-intercept: set y = 0: 3x = 6, x = 2. Point (2, 0).
  • y-intercept: set x = 0: 2y = 6, y = 3. Point (0, 3).
  • Check: x = 4: 12 + 2y = 6, y = −3. Point (4, −3) lies on the line through the first two.

The method fails only when the line passes through the origin (both intercepts are (0, 0)); then use a table or rearrange to y = mx.

Method 4: point-slope form, y − y₁ = m(x − x₁)

Used when a point and the slope are given, or when the equation arrives in that form.

y − 1 = ½(x + 4): the point is (−4, 1) (note the sign flips: x + 4 means x₁ = −4) and the slope ½. Plot (−4, 1); up 1, right 2 → (−2, 2); again → (0, 3). Join. Rearranged, this is y = ½x + 3, and the y-intercept 3 agrees.

To write the equation of a line through (2, 5) with slope −3: y − 5 = −3(x − 2), or y = −3x + 11.

The special cases: horizontal and vertical lines

Equation Line Through Slope
y = k (e.g. y = 3) horizontal (0, 3), and every point with y = 3 0
x = k (e.g. x = 3) vertical (3, 0), and every point with x = 3 undefined
y = 0 the x-axis 0
x = 0 the y-axis undefined

"x = 3" is the set of points whose x-coordinate is 3: (3, −2), (3, 0), (3, 5) ... which stack up vertically. The name of the variable tells you which coordinate is fixed, not which axis the line follows.

Reading a graph: slope and intercept from a drawn line

  • y-intercept: where the line crosses the y-axis; read the y-value.
  • Slope: choose two points where the line passes exactly through grid intersections; slope = (y₂ − y₁) ÷ (x₂ − x₁). From (0, −3) to (2, 1): 4 ÷ 2 = 2.
  • Sign: rising to the right is positive; falling to the right is negative; flat is 0.
  • Equation: y = (slope)x + (intercept). The line above is y = 2x − 3.

Larger |m| is steeper; m = 1 is a 45° line.

Parallel and perpendicular lines

  • Parallel lines have the same slope and different intercepts: y = 2x + 1 and y = 2x − 5 never meet.
  • Perpendicular lines have slopes that multiply to −1 (each is the negative reciprocal of the other): y = 2x + 1 and y = −½x + 4 cross at right angles. A horizontal line (slope 0) is perpendicular to a vertical one.
  • Two lines with different slopes cross at exactly one point, the solution of the pair as simultaneous equations, which is where "systems of equations" begins.

The eight mistakes

  1. Plotting (x, y) as (y, x).
  2. Reading the slope as run over rise. It is rise over run: vertical change first.
  3. Treating a negative slope as "down and left". Down and right (or up and left).
  4. Swapping x = 3 and y = 3.
  5. Joining the points freehand, or stopping the line at the points. Ruler, and arrows.
  6. Using the x-intercept as b. The y-intercept is where x = 0.
  7. Forgetting to rearrange before reading m and b: in 2y = 6x − 4, the slope is 3, not 6.
  8. Not checking with a third point. One arithmetic slip moves the whole line.

Where it sits in each curriculum

Curriculum When What is expected
US Common Core Grade 8 (8.EE.6: derive y = mx + b; 8.F.3: interpret y = mx + b as a linear function; 8.F.4), Algebra 1 (HSA-CED.A.2: graph equations on coordinate axes; HSF-IF.C.7a) all four methods, slope from two points, parallel and perpendicular
England KS3 (Year 8: plot y = mx + c from a table; gradient and intercept), GCSE (y = mx + c, parallel and perpendicular lines at higher tier, equation from a graph) "gradient" and "c" in place of "slope" and "b"
Australia Year 8 (plot linear relationships on the Cartesian plane), Year 9 (gradient, y = mx + c, parallel and perpendicular), Year 10 gradient-intercept method
India (CBSE) Class 9 (Linear Equations in Two Variables: graph by a table of values), Class 10 (pair of linear equations graphically) table method, intercepts

Practice (answers in the PDF)

Graph each on the grids in the PDF, then answer the questions.

  1. y = 3x − 2 (give three points).
  2. y = −½x + 4 (use the slope from the intercept).
  3. 2x − 5y = 10 (find both intercepts).
  4. y + 2 = 2(x − 1) (name the point and slope, then two more points).
  5. Draw x = −2 and y = 4 on the same grid. Where do they cross?
  6. A line passes through (1, 5) and (3, 1). Find its slope and its equation. Is it parallel or perpendicular to y = ½x + 7?

Download the sheet with the grids and answers (PDF)

Where to get help

A 1-on-1 online maths class with a tutor who holds a master's in mathematics and teaches Grade 8 and Algebra 1, KS3 and GCSE, the Australian Years 8 to 10 and CBSE Class 9 and 10 every week: straight-line graphs drawn together on a shared grid, with the third-point check made a habit and the rise-over-run move rehearsed until the sign of the slope is never wrong. The Algebra 1 page lists the units; the free 30-minute first class is a real lesson on this week's homework. Related pages: the coordinate grid and graphing proportional relationships.

Questions parents ask

1How do you graph a linear equation?
Find two points that satisfy the equation (three is safer, as a check), plot them on a coordinate grid, and draw the straight line through them with a ruler, extending it past the points with arrows at both ends. The quickest way to find the points depends on the form of the equation: use the y-intercept and slope for y = mx + b, the two intercepts for Ax + By = C, or a table of values for anything.
2How do you graph y = mx + b?
Plot the y-intercept (0, b) on the y-axis. Write the slope m as a fraction, rise over run. From the intercept, move up by the rise (down if negative) and right by the run, and plot the second point. Repeat for a third. Join with a ruler. For y = 2x − 3: start at (0, −3), slope 2 = 2/1, so up 2 and right 1 to (1, −1), then (2, 1).
3How do you graph an equation in standard form Ax + By = C?
Find the intercepts. Set y = 0 and solve for x to get the x-intercept; set x = 0 and solve for y to get the y-intercept. Plot both and join them. For 3x + 2y = 6: y = 0 gives x = 2, so (2, 0); x = 0 gives y = 3, so (0, 3). A third point (such as x = 4, y = −3) checks the line.
4What do the graphs of x = 3 and y = 3 look like?
y = 3 is a horizontal line through (0, 3): every point on it has y-coordinate 3, whatever x is; its slope is 0. x = 3 is a vertical line through (3, 0): every point has x-coordinate 3; its slope is undefined. Children swap them because "x = 3" sounds like it should be along the x-axis; it is the line where x is always 3, which runs up and down.
5How do you find the slope from a graph?
Pick two points on the line where it crosses grid intersections exactly. Slope = rise ÷ run = (change in y) ÷ (change in x) = (y₂ − y₁) ÷ (x₂ − x₁). Going up to the right is a positive slope; down to the right is negative. From (1, 2) to (4, 8) the slope is 6 ÷ 3 = 2.

See how we teach this, 1-on-1 online →

written by

Shobha

Founder and lead tutor, Science with Shobha

Teaching maths, science and English to children online since 2018. 500+ students, 20+ tutors, families in nine countries.

About the team →

Keep reading

Related articles

🧮
No. 345 · Maths

Graphing proportional relationships: what the graph looks like (a straight line through the origin), how to read the constant of proportionality from the graph (the y-value at x = 1, which is also the unit rate and the slope), how to tell a proportional graph from a non-proportional one, comparing two proportional relationships given in different forms, worked examples, the mistakes, and a printable sheet with graphs and practice

A proportional relationship y = kx graphs as a straight line through the origin (0, 0); the constant of proportionality k is the y-value where x = 1, and it is also the u

7 min readRead →
🧮
No. 339 · Maths

Coordinate grid: how to plot and read points, ordered pairs (x before y, "along the corridor, up the stairs"), the four quadrants and their signs, the axes and the origin, distance between points, reflections across the axes, the midpoint, the mistakes, and printable coordinate grid paper in three sizes

A coordinate grid (coordinate plane) is two number lines at right angles, the x-axis across and the y-axis up, crossing at the origin (0, 0); a point is named by an order

6 min readRead →
🧮
No. 105 · Maths

How to solve quadratic equations step by step: factoring, completing the square and the quadratic formula, worked in full, which method to use when, the discriminant, and the six mistakes that lose the marks

How to solve quadratic equations step by step with all three methods worked in full: factoring (x² + 5x + 6 = 0 and 2x² - 5x - 3 = 0), completing the square (x² + 6x + 2

5 min readRead →

← All articles in the Knowledge Hub