"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.
- Plot (0, b) on the y-axis.
- Write m as a fraction: rise over run. 2 is 2/1; −¾ is down 3, right 4; ½ is up 1, right 2.
- From (0, b), move the rise (up for positive, down for negative) and the run (right), plot. Repeat once more.
- 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
- Plotting (x, y) as (y, x).
- Reading the slope as run over rise. It is rise over run: vertical change first.
- Treating a negative slope as "down and left". Down and right (or up and left).
- Swapping x = 3 and y = 3.
- Joining the points freehand, or stopping the line at the points. Ruler, and arrows.
- Using the x-intercept as b. The y-intercept is where x = 0.
- Forgetting to rearrange before reading m and b: in 2y = 6x − 4, the slope is 3, not 6.
- 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.
- y = 3x − 2 (give three points).
- y = −½x + 4 (use the slope from the intercept).
- 2x − 5y = 10 (find both intercepts).
- y + 2 = 2(x − 1) (name the point and slope, then two more points).
- Draw x = −2 and y = 4 on the same grid. Where do they cross?
- 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?
2How do you graph y = mx + b?
3How do you graph an equation in standard form Ax + By = C?
4What do the graphs of x = 3 and y = 3 look like?
5How do you find the slope from a graph?
See how we teach this, 1-on-1 online →
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.
