Resources For Teachers For Tutors For Students & Parents AI New Pricing
Year 10 Maths - 10A Linear Relations

Finding an Equation of a Line

20 practice questions 1 video lesson Theory + worked examples
Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 1 video(s)
  • Finding an Equation of a Line - Video - The Equation of a Line Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The equation of a straight line can be written in gradient–intercept form \(y = mx + c\), point–gradient form \(y - y_1 = m(x - x_1)\) or general form \(ax + by + c = 0\). This Year 10A maths page revises and extends the work from Years 7 to 9: finding the equation from a point and a gradient, from two points or from a graph, changing between forms, and solving problems with intercepts, parallel and perpendicular lines.

The equation of a line is a rule that every point on the line satisfies, and no other point does. To test a point, substitute its coordinates.

In gradient–intercept form \(y = mx + c\), \(m\) is the gradient and \(c\) is the \(y\)-intercept, where the line cuts the \(y\)-axis.

Point–gradient form \(y - y_1 = m(x - x_1)\) gives the equation straight away from one point \((x_1,\ y_1)\) and the gradient \(m\).

General form \(ax + by + c = 0\) has every term on one side, usually with whole numbers and \(a\) positive. The \(x\)-intercept is where \(y = 0\) and the \(y\)-intercept is where \(x = 0\).

Gradient and y-intercept of a lineThe line y equals three halves x plus 1. It crosses the y-axis at (0, 1), which is the y-intercept c, and a dashed step of 2 across and 3 up shows the gradient three halves. xy-2-1123456-112345670 run 2 rise 3 (0, c) = (0, 1) y = mx + c m = 3/2, c = 1
In \(y = mx + c\), \(m\) is the gradient and \(c\) is where the line cuts the \(y\)-axis.
One line, several formsThe line 2x plus 3y minus 12 equals 0 crosses the x-axis at (6, 0) and the y-axis at (0, 4), and passes through (3, 2). xy-11234567-1123450 (6, 0) (0, 4) (3, 2) 2x + 3y − 12 = 0
The same line is \(y = -\dfrac{2}{3}x + 4\), \(y - 2 = -\dfrac{2}{3}(x - 3)\) and \(2x + 3y - 12 = 0\). Put \(x = 0\) or \(y = 0\) to find the intercepts.
\[y = mx + c\]\[y - y_1 = m(x - x_1)\]\[ax + by + c = 0\]
y=mx+c;y−y1=m(x−x1);ax+by+c=0

Gradient from two points, and from general form:

\[m = \dfrac{y_2 - y_1}{x_2 - x_1}\]\[ax + by + c = 0 \ \Rightarrow\ m = -\dfrac{a}{b}\]
m=y2−y1x2−x1
Parallel and perpendicular. Parallel lines have equal gradients; perpendicular lines have gradients that multiply to \(-1\). A line parallel to \(ax + by + c = 0\) can be written \(ax + by + k = 0\); substitute a point to find \(k\). Through \((x_1,\ y_1)\) it is \(ax + by = ax_1 + by_1\).
From a graph. Read two clear points, such as the intercepts. A line through \((p,\ 0)\) and \((0,\ q)\) has gradient \(-\dfrac{q}{p}\) and \(y\)-intercept \(q\).
From a graph. Read the \(y\)-intercept where the line cuts the \(y\)-axis, then pick a second point where the line crosses grid lines exactly. Count the run to the right and the rise up (a fall is a negative rise): a line through \((0,\ 2)\) and \((3,\ -2)\) has \(m = -\dfrac{4}{3}\), so \(y = -\dfrac{4}{3}x + 2\), or \(4x + 3y - 6 = 0\) in general form. Check the scale on each axis first.
Linked intercepts. If a line has \(y\)-intercept \(b\) and its \(x\)-intercept is three times as big, its intercepts are \((0,\ b)\) and \((3b,\ 0)\), so \(m = \dfrac{0 - b}{3b - 0} = -\dfrac{1}{3}\). Through \((3,\ 2)\): \(2 = -\dfrac{1}{3}(3) + b\), so \(b = 3\) and the line is \(y = -\dfrac{1}{3}x + 3\).

How to find the equation of a line

  1. Find the gradient: given, from two points, from a parallel line (same) or a perpendicular line (negative reciprocal).
  2. Find a point on the line: given, an intercept, a midpoint, or an intersection of two other lines.
  3. Substitute into \(y - y_1 = m(x - x_1)\).
  4. Rearrange to the form asked for. For general form, multiply out fractions and move everything to one side.
  5. Check that a second known point satisfies your equation.

Common problem types

  1. Is a point on the line? Substitute its \(x\) and compare the \(y\). The difference tells you how far above or below the line it is.
  2. Perpendicular bisector (the line that cuts an interval in half at right angles): it goes through the midpoint, with the negative reciprocal gradient.
  3. Unknown in the equation: if a line such as \(kx + (k + 2)y = 4\) passes through a point, substitute the point and solve for \(k\).
  4. Through an intersection: solve the two equations simultaneously to get the point, then use it.
  5. Altitudes and medians: an altitude goes through a vertex perpendicular to the opposite side; a median goes through a vertex and the midpoint of the opposite side. Two of them meet where you solve their equations together.
  6. Missing vertex of a parallelogram: draw lines through the known vertices parallel to the opposite sides; the vertex is where they meet.
  7. Area with the axes: write the intercepts in terms of the unknown and use area \(= \dfrac{1}{2} \times\) base \(\times\) height (Example 4).
Example 1 — Point and gradient
Find the equation of the line through \((2,\ -5)\) with gradient \(-\dfrac{3}{4}\). Give it in general form, then find its \(x\)- and \(y\)-intercepts.
Solution

Use the point–gradient form, then multiply by \(4\) to clear the fraction and move every term to one side.

\(y - y_1\)\(=\)\(m(x - x_1)\)
\(y - (-5)\)\(=\)\(-\dfrac{3}{4}(x - 2)\)
\(4(y + 5)\)\(=\)\(-3(x - 2)\)
\(4y + 20\)\(=\)\(-3x + 6\)
\(3x + 4y + 14\)\(=\)\(0\)
3x+4y+14=0

The equation is \(\boldsymbol{3x + 4y + 14 = 0}\). For the intercepts, put one variable equal to \(0\):

Put \(y = 0\):

\(3x + 14\)\(=\)\(0\)
\(x\)\(=\)\(-\dfrac{14}{3}\)

Put \(x = 0\):

\(4y + 14\)\(=\)\(0\)
\(y\)\(=\)\(-\dfrac{7}{2}\)
x=−143,y=−72

General form \(ax + by + c = 0\) usually has whole numbers and a positive \(x\) term.

Example 2 — Two points

(i) Find the equation of the line through \((-1,\ 4)\) and \((3,\ -4)\) in the form \(y = mx + c\).
(ii) Does the point \((5,\ -8)\) lie on this line?
Solution

(i) Find the gradient, then substitute either point.

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

The line is \(\boldsymbol{y = -2x + 2}\). Check with the other point: \(-2(3) + 2 = -4\ \checkmark\)

(ii) A point lies on a line if its coordinates satisfy the equation.

\(x = 5:\quad y\)\(=\)\(-2(5) + 2 = -8\)
y=−2(5)+2=-8

This matches, so yes, \((5,\ -8)\) lies on the line.

Example 3 — From a graph, intercept off 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 4 — A family of parallel lines
A line parallel to \(2x + 3y - 1 = 0\) forms a triangle of area \(12\text{ units}^2\) with the positive \(x\)- and \(y\)-axes. Find its equation.
Solution

Every line parallel to \(2x + 3y - 1 = 0\) can be written \(2x + 3y = k\): same \(x\) and \(y\) terms, different constant. Find its intercepts in terms of \(k\).

\(y = 0:\)\(\)\(x = \dfrac{k}{2}\)
\(x = 0:\)\(\)\(y = \dfrac{k}{3}\)

The triangle is right-angled at the origin, with the intercepts as its base and height.

\(\dfrac{1}{2} \times \dfrac{k}{2} \times \dfrac{k}{3}\)\(=\)\(12\)
\(\dfrac{k^2}{12}\)\(=\)\(12\)
\(k^2\)\(=\)\(144\)
\(k\)\(=\)\(12\)

Take \(k \gt 0\), because the triangle is on the positive axes.

k212=12,k=12

The line is \(\boldsymbol{2x + 3y - 12 = 0}\). Check: intercepts \(6\) and \(4\), and \(\dfrac{1}{2} \times 6 \times 4 = 12\ \checkmark\)

Common pitfalls

Sign of the point. Through \((-1,\ 4)\), \(y - y_1 = m(x - x_1)\) becomes \(y - 4 = m(x + 1)\). Writing \(x - 1\) is the most common error.
Clear fractions from the whole equation. Multiply every term by the denominator: \(y - 2 = \dfrac{3}{5}(x + 1)\) becomes \(5y - 10 = 3x + 3\), not \(5y - 2 = 3x + 3\).
General form has zero on one side. \(3x + 4y = -14\) is not general form. Write \(3x + 4y + 14 = 0\).
Gradient from general form. In \(2x - 7y + 2 = 0\) the gradient is \(\dfrac{2}{7}\), not \(2\) or \(-5\). Rearrange, or use \(m = -\dfrac{a}{b}\).
Use the right point. The perpendicular bisector goes through the midpoint, not an endpoint. An altitude goes through the vertex, not the midpoint.
Do not guess an intercept. If a line crosses the \(y\)-axis between grid lines, reading \(c \approx -0.5\) is not exact. Calculate \(c\) from an exact grid point (Example 3).

Frequently asked questions

How do you find the equation of a line from two points?

Find the gradient with \(m = \dfrac{y_2 - y_1}{x_2 - x_1}\). Then substitute the gradient and either point into \(y - y_1 = m(x - x_1)\), and rearrange.

What is the point-gradient formula?

\(y - y_1 = m(x - x_1)\), where \(m\) is the gradient and \((x_1,\ y_1)\) is a point on the line. It gives the equation directly from one point and the gradient.

How do you write a line in general form?

Move every term to one side so the other side is \(0\), clear any fractions by multiplying, and usually make the \(x\) term positive. For example, \(y = \dfrac{2}{3}x - 1\) becomes \(2x - 3y - 3 = 0\).

How do you find the x-intercept of a line?

Substitute \(y = 0\) into the equation and solve for \(x\). For the \(y\)-intercept substitute \(x = 0\).

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

Read the \(y\)-intercept, then use a second exact grid point to find the gradient as rise over run. Write \(y = mx + c\) and check with another point on the line.