Linear Graphs

A straight-line graph shows how two quantities are connected. In this lesson, you will plot points, draw a line and understand what its slope tells you.

Build from plotting to equations of lines. Parallel lines and finding a line’s equation are Foundation and Higher skills. Perpendicular lines are introduced in a clearly labelled Higher extension.

What is a linear graph?

A linear graph is a straight line. The rule connecting the two quantities is called a linear relationship.

First, meet the axes: the two number lines on a graph. The x-axis goes across. The y-axis goes up and down. They meet at the origin, (0, 0).

A point has two coordinates, written (x, y). The letter x tells you the horizontal position; y tells you the vertical position.

For (2, 3), start at the origin. Go 2 units right. Then go 3 units up. Negative x values are to the left; negative y values are below the origin.

The point (2, 3)Start at zero. Move two units right, then three units up to the marked point. 1 2 3 4 1 2 3 4 0xy

The dot above is (2, 3). The dashed path shows how to reach it.

For equal steps in x, a linear relationship has equal changes in y. For example, if y goes up by 2 every time x goes up by 1, the plotted points follow a straight line.

Example Question:

Draw the graph of y = 2x + 1.

This rule means: multiply x by 2, then add 1 to get y. The expression 2x means 2 × x.

We will build a table and draw the line in Example 1.

Exam Tip

Read the scale on each axis before plotting. One square does not always mean one unit.

Plot x across first, then y up or down. Use a ruler for the straight line.

Key results from Example 1

For y = 2x + 1:

Gradient = 2. Go 1 right and 2 up.

Y-intercept = 1. The line crosses the y-axis at (0, 1).

Check your graph

Choose a plotted point and check it in the equation. For (1, 3) on y = 2x + 1:

2 × 1 + 1 = 3

This matches the point’s y value.

Also check the other plotted points. They should lie on the same straight line. If one is out of line, recheck its calculation and coordinates.

Finding and using equations of lines

Worked example — A line through two points

Find the line through (1, 2) and (3, 8).

Gradient = (8 − 2) ÷ (3 − 1) = 6 ÷ 2 = 3.

Write y = 3x + c. Use (1, 2): 2 = 3 × 1 + c, so c = −1.

y = 3x − 1. Check the other point: 3 × 3 − 1 = 8.

If the gradient and one point are already given, start directly with y = mx + c and find c.

Worked example — An equation in another form

Find the gradient and y-intercept of 2x + y = 6.

Subtract 2x from both sides: y = −2x + 6.

The gradient is −2 and the y-intercept is 6. Do not read the coefficient +2 from the unrearranged equation as its gradient.

A vertical line such as x = −2 has every point’s x-coordinate equal to −2. Its gradient is undefined. A horizontal line y = −2 has gradient zero.

Worked example — Use a graph to solve an equation

To estimate the solution of 2x + 1 = 6, draw y = 2x + 1 and the horizontal line y = 6.

For the sloping line, points include (0, 1), (1, 3), (2, 5) and (3, 7). The horizontal line stays at height 6.

Read the x-coordinate of their crossing: x = 2.5. Check: 2 × 2.5 + 1 = 6.

A graph reading may be approximate. Algebra gives an exact check: subtract 1, then divide by 2.

Higher extension — Perpendicular lines

Perpendicular lines meet at a right angle. For two lines with defined, non-zero gradients, their gradients multiply to −1.

A line with gradient 2 is perpendicular to one with gradient −½, since 2 × (−½) = −1.

Find a line perpendicular to y = 2x + 3 through (2, 4). Use gradient −½.

y = −½x + c. Substitute the point: 4 = −1 + c, so c = 5.

y = −½x + 5. Check: −½ × 2 + 5 = 4.

Horizontal and vertical lines are also perpendicular, but the gradient-product test cannot use an undefined vertical gradient.

Coordinates, intercepts and two-line solutions

Worked example — All four quadrants

The axes divide the plane into four quadrants. A(2, 3) is upper right, B(−2, 3) upper left, C(−2, −3) lower left and D(2, −3) lower right. For D, move 2 right and 3 down. A point on an axis is not in a quadrant.

Worked example — Both intercepts

For y = 2x + 1, the y-intercept is (0, 1). At the x-axis, y = 0: solve 0 = 2x + 1 to get x = −½. Thus the x-intercept is (−½, 0). These agree with the plotted line earlier. Set the other coordinate to zero when finding an intercept.

Worked example — Solve two linear equations graphically

Solve y = 2x + 1 and y = 7 − x by drawing both on the same axes. For the first, plot (0, 1), (2, 5), (3, 7). For the second, plot (0, 7), (2, 5), (3, 4). Use the same scales and draw each straight line through its points.

Read their intersection as (2, 5): the simultaneous solution is x = 2, y = 5. Check both equations: 5 = 2 × 2 + 1 and 5 = 7 − 2. The x-coordinate alone solves 2x + 1 = 7 − x. A graph reading is approximate unless the coordinates are known exactly.

Shared practice — Describe the position of (−3, −2). Find both intercepts of y = 2x − 4.

Move 3 left and 2 down: the point is in the lower-left quadrant.

At x = 0, y = −4, giving (0, −4). At y = 0, 2x − 4 = 0 gives x = 2, so the other intercept is (2, 0).

Shared practice — Draw y = x + 1 and y = 5 − x on the same axes. Read the intersection and check it.

For y = x + 1 use (0, 1), (2, 3), (4, 5); for y = 5 − x use (0, 5), (2, 3), (4, 1).

The intersection is (2, 3), so x = 2 and y = 3. Checks: 3 = 2 + 1 and 3 = 5 − 2. Allow sensible reading tolerance for a hand-drawn graph.

Further practice — equations and intersections

10. Find the equation of the line through (0, −2) and (3, 4).

Gradient = (4 − (−2)) ÷ (3 − 0) = 6 ÷ 3 = 2.

The point (0, −2) gives intercept −2. The equation is y = 2x − 2.

Check: 2 × 3 − 2 = 4.

11. State the gradient and y-intercept of 3x + y = 8.

Subtract 3x: y = −3x + 8.

Gradient −3; y-intercept 8.

12. A line y = 3x − 1 crosses the horizontal line y = 5. Which equation does the crossing solve, and what is x?

At the crossing, both y-values are 5, so 3x − 1 = 5.

Add 1: 3x = 6. Divide by 3: x = 2.

The crossing is (2, 5); substitute to check 3 × 2 − 1 = 5.

13. Higher: find the line perpendicular to y = 4x + 1 through (4, 2).

Its gradient is −¼, because 4 × (−¼) = −1.

Use y = −¼x + c. At (4, 2), 2 = −1 + c, so c = 3.

y = −¼x + 3. Check: −¼ × 4 + 3 = 2.

Frequently Asked Questions

How do I recognise a straight-line relationship?

For equal increases in x, the change in y stays the same. When you plot points from the rule, they lie on a straight line. A short table can suggest this pattern; the rule tells you whether it continues.

What if there is no number written before x?

In y = x + 4, the gradient is 1. In y = −x + 4, it is −1.

What if there is no number added at the end?

In y = 3x, the y-intercept is 0. The line passes through the origin, (0, 0).

Do I always need a table?

Two different points determine a straight line. A table with three or more points gives you an extra check and is a helpful starting method. Follow the instructions in the question.

Can a gradient be a fraction?

Yes. If a line goes 2 right and 1 up, its gradient is 1 ÷ 2 = ½. The symbol ½ means one half.

Is a vertical line’s gradient zero?

No. A horizontal line has gradient zero. A vertical line, such as x = 2, has no horizontal change, so the gradient calculation would divide by zero. Its gradient is undefined, and it cannot be written as y = mx + c.

Scroll to Top