Equation of Lines
A line's equation can be found from its gradient and one point, using \(y-y_1=m(x-x_1)\), or from two points by finding the gradient first. In NSW Year 10 Advanced maths answers are written in gradient–intercept form \(y=mx+c\) or as \(ax+by+c=0\), which is general form. Some lines must run parallel to, or at right angles to, another line (NESA outcome MA5‑LIN‑P‑01).
You will find equations from a gradient and a point, from two points and from a graph, and find lines that run parallel to, or at right angles to, another line. You will find a perpendicular bisector, an altitude and the medians of a triangle, the fourth vertex of a parallelogram, and a line that cuts off a triangle of given area. Real problems check if a marked point sits on the line, and how far above or below it is. It is part of Year 10 Advanced Straight Line Graphs.
Every question with a fully worked solution.
- Equation of Lines - Video - The Equation of a Line Watch
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 10 Advanced maths page shows how to find the equation from a point and a gradient or from two points, change between forms, and solve 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 from two points, and from general form:
How to find the equation of a line
- Find the gradient: given, from two points, from a parallel line (same) or a perpendicular line (negative reciprocal).
- Find a point on the line: given, an intercept, a midpoint, or an intersection of two other lines.
- Substitute into \(y - y_1 = m(x - x_1)\).
- Rearrange to the form asked for. For general form, multiply out fractions and move everything to one side.
- Check that a second known point satisfies your equation.
Common problem types
- 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.
- Perpendicular bisector: midpoint plus the negative reciprocal gradient (Example 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\).
- Through an intersection: solve the two equations simultaneously to get the point, then use it.
- 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.
- Missing vertex of a parallelogram: draw lines through the known vertices parallel to the opposite sides; the vertex is where they meet.
- Area with the axes: write the intercepts in terms of the unknown and use area \(= \dfrac{1}{2} \times\) base \(\times\) height (Example 4).
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\) |
The equation is \(\boldsymbol{3x + 4y + 14 = 0}\). For the intercepts, put one variable equal to \(0\):
| \(y = 0:\quad 3x + 14 = 0\) | \(\Rightarrow\) | \(x = -\dfrac{14}{3}\) |
| \(x = 0:\quad 4y + 14 = 0\) | \(\Rightarrow\) | \(y = -\dfrac{7}{2}\) |
General form \(ax + by + c = 0\) usually has whole numbers and a positive \(x\) term.
(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?
(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\) |
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\) |
This matches, so yes, \((5,\ -8)\) lies on the line.
The perpendicular bisector passes through the midpoint of \(AB\) and is perpendicular to \(AB\).
| \(M\) | \(=\) | \(\left(\dfrac{-2 + 4}{2},\ \dfrac{-1 + 3}{2}\right) = (1,\ 1)\) |
| \(m_{AB}\) | \(=\) | \(\dfrac{3 - (-1)}{4 - (-2)} = \dfrac{2}{3}\) |
| \(m_{\perp}\) | \(=\) | \(-\dfrac{3}{2}\) |
Now the point–gradient form through \(M(1,\ 1)\):
| \(y - 1\) | \(=\) | \(-\dfrac{3}{2}(x - 1)\) |
| \(2y - 2\) | \(=\) | \(-3x + 3\) |
| \(3x + 2y - 5\) | \(=\) | \(0\) |
The perpendicular bisector is \(\boldsymbol{3x + 2y - 5 = 0}\). Every point on it is the same distance from \(A\) as from \(B\).
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\quad (k \gt 0,\ \text{positive axes})\) |
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
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\).
What is a perpendicular bisector?
It is the line that cuts an interval in half at right angles. It passes through the midpoint and its gradient is the negative reciprocal of the interval's gradient.