Resources For Teachers For Tutors For Students & Parents AI New Pricing
Year 10 Maths Advanced Straight Line Graphs

Finding the Equation of a Line Graphically

20 practice questions 1 video lesson Theory + worked examples

Finding the equation of a line graphically means reading two points from its graph, working out the gradient, then writing the equation. When the \(y\)-intercept can be read, \(y=mx+c\) follows straight away. In NSW Year 10 Advanced maths answers are given in gradient–intercept form or in general form with integer coefficients (NESA outcome MA5‑LIN‑C‑02).

You will find equations of lines drawn on grids, including lines whose intercepts are fractions and grids where each square is 0.5 units. You will find the equations of the three sides of a triangle, the area enclosed by a line and the axes, where two lines cross, and an unknown point that lies beyond the edge of the grid. You will also prove that three marked points are collinear. It is part of Year 10 Advanced Straight Line Graphs.

Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 1 video(s)
  • Finding the Equation of a Line Graphically - Video - Finding the Equation of a Line from a Graph (y = mx+b) Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

To find the equation of a line from its graph, read two exact points, work out the gradient as rise over run, then find the \(y\)-intercept, by reading it if it is on a grid point or by calculating it if not. This Year 10 Advanced maths page covers general form, unequal scales and lines meeting off the grid.

A straight line is fixed by its gradient \(m\) and one point. On a graph, the clearest information is where the line passes exactly through a grid point, a place where grid lines cross.

The \(y\)-intercept \(c\) can be read straight off the graph only if the line crosses the \(y\)-axis at a grid point. Otherwise, substitute a known point into \(y = mx + c\) and solve.

Always check the scale on each axis. A square might be \(0.5\) units, or a different number of units on the two axes.

In general form \(ax + by + c = 0\) the coefficients are usually whole numbers with no common factor and \(a \gt 0\).

Reading a line from a gridA line passes exactly through the grid points (-3, -2) and (3, 2). A dashed run of 6 and rise of 4 between them give gradient two thirds. xy-4-3-2-112345-3-2-1123450 run 6 rise 4 (−3, −2) (3, 2)
Choose two points where the line crosses grid corners exactly. Count the run and the rise between them.
A graph with different scales on the axesEach square is 1 unit across but 20 units up. The line passes through (0, 20) and (8, 100), so its gradient is 80 divided by 8, which is 10, not one square up per square across. 2 4 6 8 20 40 60 80 100 (0, 20) (8, 100) m = 80/8 = 10
Read the scales first. Here one square up is \(20\) units, so count values, not squares.
\[m = \dfrac{\text{rise}}{\text{run}} = \dfrac{y_2 - y_1}{x_2 - x_1} \qquad y = mx + c \qquad y - y_1 = m(x - x_1)\]
m=y2−y1x2−x1;y=mx+c

From the two axis intercepts \((p,\ 0)\) and \((0,\ q)\):

\[m = -\dfrac{q}{p} \qquad c = q\]
m=−qp,c=q
Clearing fractions for general form. Multiply by the lowest common denominator: \(y = \dfrac{2}{3}x + \dfrac{1}{2}\) times \(6\) gives \(6y = 4x + 3\), so \(4x - 6y + 3 = 0\). Then divide out any common factor.
Unknown coefficients. If the line is \(ax + by = k\) and two points on it are known, substitute both to get two equations in \(a\) and \(b\), then solve them simultaneously.

How to find the equation from a graph

  1. Read the scales on both axes.
  2. Pick two points where the line passes exactly through grid points, as far apart as possible.
  3. Find the gradient: run across, rise up (negative if the line falls). Check the sign against the picture.
  4. Find \(c\): read it if the line crosses the \(y\)-axis at a grid point; otherwise substitute a point into \(y = mx + c\).
  5. Write the equation in the form asked for, and check it with your second point.

Using the equation

  1. A point beyond the grid: substitute its known coordinate into the equation to find the other, e.g. \(P(a,\ 5)\) gives \(5 = ma + c\).
  2. Intercepts off the grid: put \(y = 0\) or \(x = 0\) in the equation; the answer may be a fraction.
  3. Two lines: find both equations, then solve simultaneously for the exact intersection (Example 4).
  4. Sides of a triangle: find each side's equation from its two vertices.
  5. Collinear points: equal gradients \(m_{PQ} = m_{QR}\) with a shared point mean one line.
  6. Areas: the triangle a line makes with the axes has area \(\dfrac{1}{2} \times |p| \times |q|\).
Example 1 — The intercept is on the grid
The line in the diagram passes through \((0,\ 3)\) and \((2,\ -2)\). Find its equation in the form \(y = mx + c\) and in general form.
Solution
Line through (0, 3) and (2, -2)A falling line crossing the y-axis at 3 and passing through the grid point (2, -2). xy-2-11234-4-3-2-1123450 (0, 3) (2, −2)

The line falls from left to right, so expect a negative gradient. From \((0,\ 3)\) to \((2,\ -2)\) it runs \(2\) and falls \(5\).

\(m\)\(=\)\(\dfrac{-2 - 3}{2 - 0} = -\dfrac{5}{2}\)
\(c\)\(=\)\(3\)
\(y\)\(=\)\(-\dfrac{5}{2}x + 3\)
y=−52x+3

Multiply by \(2\) and collect on one side:

\(2y\)\(=\)\(-5x + 6\)
\(5x + 2y - 6\)\(=\)\(0\)
5x+2y−6=0

So \(\boldsymbol{y = -\dfrac{5}{2}x + 3}\), or \(\boldsymbol{5x + 2y - 6 = 0}\).

Example 2 — The intercept is not on the grid
A line passes through the grid points \((-3,\ -3)\) and \((2,\ 1)\), but crosses the \(y\)-axis between grid lines. Find its equation in general form, with integer coefficients and \(a \gt 0\).
Solution
Line through (-3, -3) and (2, 1)A rising line through the grid points (-3, -3) and (2, 1). It crosses the y-axis between 0 and -1, not on a grid point. xy-4-3-2-1123-4-3-2-11230 (−3, −3) (2, 1)

Reading \(c\) from the graph would only be a guess, so calculate it.

\(m\)\(=\)\(\dfrac{1 - (-3)}{2 - (-3)} = \dfrac{4}{5}\)
\(1\)\(=\)\(\dfrac{4}{5}(2) + c\)
\(c\)\(=\)\(1 - \dfrac{8}{5} = -\dfrac{3}{5}\)
y=45x−35

So \(y = \dfrac{4}{5}x - \dfrac{3}{5}\). Multiply by \(5\):

\(5y\)\(=\)\(4x - 3\)
\(4x - 5y - 3\)\(=\)\(0\)
4x−5y−3=0

The equation is \(\boldsymbol{4x - 5y - 3 = 0}\). Check \((-3,\ -3)\): \(-12 + 15 - 3 = 0\ \checkmark\)

Example 3 — Different scales
On the grid shown, one square across is \(1\) unit and one square up is \(10\) units. Find the equation of the line.
Solution
Line on a grid with unequal scalesEach square is 1 unit across and 10 units up. The line crosses the y-axis at 40 and passes through (5, -10). 1 2 3 4 5 6 -20 -10 10 20 30 40 (0, 40) (5, −10)

Read values, not squares. The line passes through \((0,\ 40)\) and \((5,\ -10)\).

\(m\)\(=\)\(\dfrac{-10 - 40}{5 - 0} = \dfrac{-50}{5} = -10\)
\(c\)\(=\)\(40\)
y=−10x+40

The equation is \(\boldsymbol{y = -10x + 40}\). Counting squares would give a gradient of \(-1\), which is wrong by a factor of \(10\).

Example 4 — Where do the lines meet?
Line A passes through \((-4,\ -1)\) and \((2,\ 2)\). Line B passes through \((0,\ 5)\) and \((3,\ -1)\). Find both equations, show the lines are perpendicular, and find their exact point of intersection.
Solution
Two lines on one gridLine A rises through (-4, -1) and (2, 2). Line B falls through (0, 5) and (3, -1). They cross at right angles near (1.6, 1.8). xy A B (−4, −1) (2, 2) (0, 5) (3, −1)
\(m_A\)\(=\)\(\dfrac{2 - (-1)}{2 - (-4)} = \dfrac{1}{2},\) \(2 = \dfrac{1}{2}(2) + c\) \(\Rightarrow c = 1\)
\(m_B\)\(=\)\(\dfrac{-1 - 5}{3 - 0} = -2,\) \(c = 5\)

Line A is \(y = \dfrac{1}{2}x + 1\) and line B is \(y = -2x + 5\). Since \(\dfrac{1}{2} \times (-2) = -1\), they are perpendicular.

\(\dfrac{1}{2}x + 1\)\(=\)\(-2x + 5\)
\(x + 2\)\(=\)\(-4x + 10\)
\(5x\)\(=\)\(8\)
\(x\)\(=\)\(\dfrac{8}{5},\quad y = -2\left(\dfrac{8}{5}\right) + 5 = \dfrac{9}{5}\)
(85,95)

They meet at \(\boldsymbol{\left(\dfrac{8}{5},\ \dfrac{9}{5}\right)}\), which is \((1.6,\ 1.8)\). The graph alone could not give this exactly.

Common pitfalls

Do not guess an intercept. If the line crosses the \(y\)-axis between grid lines, reading \(c \approx -0.5\) is not exact. Calculate it from a grid point.
Check the scale on each axis. When one square up is \(10\) units, a line that rises one square per square across has gradient \(10\), not \(1\).
Falling lines have negative gradients. Going left to right, if the line goes down, the gradient must be negative.
Finish general form properly. \(10x - 5y + 15 = 0\) has a common factor of \(5\); write \(2x - y + 3 = 0\). Make the \(x\) coefficient positive.
Use exact grid points. Points the line only seems to pass near give the wrong gradient. Look for corners the line cuts exactly.

Frequently asked questions

How do you find the equation of a line from a graph?

Find two points the line passes through exactly. Work out the gradient as rise over run, find the \(y\)-intercept, and write \(y = mx + c\). Check with a second point.

What if the y-intercept is not a whole number?

Calculate it. Substitute the gradient and the coordinates of a grid point on the line into \(y = mx + c\), and solve for \(c\).

How do you write the equation of a line in general form?

Start from \(y = mx + c\), multiply by the denominator to clear fractions, move every term to one side, divide out any common factor and make the \(x\) coefficient positive.

How do you find the gradient from a graph?

Choose two exact points. Count how far the line goes across (the run) and how far up or down (the rise), using the axis scales, and divide rise by run.

How do you find where two lines on a graph meet exactly?

Find the equation of each line from the graph, then solve the two equations simultaneously. The graph shows roughly where they meet; the algebra gives the exact point.