This topic works with straight lines: their equations, parallel and perpendicular lines, midpoints, lengths and perpendicular bisectors, and changing a relationship into straight-line form.
7.1 Equation of a straight line
A straight line is fixed by its gradient 斜率 and one point on it. Exam questions ask for its equation, often "in the form $ax + by + c = 0$, where $a$, $b$ and $c$ are integers 整数".
Gradient

From $A$ to $B$ the line goes 4 across and 6 up, so $m = \dfrac{6}{4} = \dfrac{3}{2}$.
The equation of a line
A line with gradient $m$ through the point $(x_1, y_1)$ is
Worked example 1. Find the equation of the line through $A(-1, 1)$ and $B(3, 7)$ in the form $ax + by + c = 0$.
- $m = \dfrac{7 - 1}{3 - (-1)} = \dfrac{3}{2}$.
- $y - 1 = \dfrac{3}{2}(x + 1)$. Multiply by 2: $2y - 2 = 3x + 3$.
- $3x - 2y + 5 = 0$.
Intercepts and points on a line
- The line meets the $y$-axis where $x = 0$, and the $x$-axis where $y = 0$. These points are the intercepts 截距.
- A point lies on a line if its coordinates 坐标 make the equation true.
- Two lines meet where their equations are true together: solve them as simultaneous equations (sheet 5.1).
- The length of $AB$ is $\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$.
Worked example 2. The line $3x - 2y + 5 = 0$ meets the $x$-axis at $P$ and the $y$-axis at $Q$. Find the area of triangle $OPQ$.
- $y = 0$: $x = -\dfrac{5}{3}$. $x = 0$: $y = \dfrac{5}{2}$.
- Area $= \dfrac{1}{2} \times \dfrac{5}{3} \times \dfrac{5}{2} = \dfrac{25}{12}$.
Worked example 3. Find where $y = 2x - 1$ meets $x + 3y = 11$.
- $x + 3(2x - 1) = 11$, so $7x = 14$ and $x = 2$.
- $y = 2(2) - 1 = 3$: the point $(2, 3)$.
7.2 Condition for parallel or perpendicular lines
Two lines are parallel 并联 when they have the same gradient. They are perpendicular 垂直 when they meet at a right angle. Both facts come from the gradients alone.
The two conditions
- Parallel: $m_1 = m_2$.
- Perpendicular: $m_1 \times m_2 = -1$, so $m_2 = -\dfrac{1}{m_1}$ ("turn it upside down and change the sign").

Turning a line through a right angle swaps "across" and "up" and changes the sign: $2 \times \left(-\dfrac{1}{2}\right) = -1$.
To find the gradient of $ax + by + c = 0$, make $y$ the subject: $y = -\dfrac{a}{b}x - \dfrac{c}{b}$, so $m = -\dfrac{a}{b}$.
Worked example 1. Find the line through $(4, 1)$ parallel to $2x + 3y = 6$.
- $3y = -2x + 6$, so $m = -\dfrac{2}{3}$.
- $y - 1 = -\dfrac{2}{3}(x - 4)$, so $3y - 3 = -2x + 8$ and $2x + 3y = 11$.
Worked example 2. Find the line through $(2, -1)$ perpendicular to $y = 3x + 4$.
- $m = 3$, so the perpendicular gradient is $-\dfrac{1}{3}$.
- $y + 1 = -\dfrac{1}{3}(x - 2)$, so $3y + 3 = -x + 2$ and $x + 3y + 1 = 0$.
Is there a right angle?
Angle $ABC$ is a right angle if $m_{AB} \times m_{BC} = -1$.
The foot of a perpendicular and the shortest distance
The shortest distance 最短距离 from a point $P$ to a line $L$ is along the perpendicular from $P$ to $L$. It meets $L$ at the foot of the perpendicular 垂足 $N$.
- Find the line through $P$ perpendicular to $L$.
- Solve it with $L$ to find $N$.
- The shortest distance is the length $PN = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$.
Worked example 3. Find the shortest distance from $P(7, 0)$ to the line $y = 2x + 1$.
- Perpendicular gradient $-\dfrac{1}{2}$: $y = -\dfrac{1}{2}(x - 7)$.
- $2x + 1 = -\dfrac{1}{2}x + \dfrac{7}{2}$, so $\dfrac{5}{2}x = \dfrac{5}{2}$: $N(1, 3)$.
- $PN = \sqrt{6^2 + 3^2} = \sqrt{45} = 3\sqrt{5}$.
7.3 Midpoint, length and perpendicular bisector
Many exam questions join the midpoint 中点, the length of a line and the perpendicular bisector 垂直平分线 into one longer problem. Each part uses a short formula.
Midpoint and length
For $A(x_1, y_1)$ and $B(x_2, y_2)$:
Worked example 1. $B(4, 3)$ is the midpoint of $AC$, where $A$ is $(1, 7)$. Find $C$.
- From $A$ to $B$: 3 across and 4 down. From $B$ to $C$ is the same step.
- $C = (4 + 3, 3 - 4) = (7, -1)$.
The perpendicular bisector of $AB$
It is the line through the midpoint of $AB$ at a right angle to $AB$. Every point on it is the same distance from $A$ and from $B$.
- Find the midpoint $M$.
- Find $m_{AB}$; the bisector has gradient $-\dfrac{1}{m_{AB}}$.
- Use $y - y_1 = m(x - x_1)$ through $M$.

The tick marks show $AM = MB$. Because $P$ is on the bisector, the dotted lines $PA$ and $PB$ are equal.
Worked example 2. Find the perpendicular bisector of $A(2, 5)$ and $B(10, -1)$.
- $M = \left(\dfrac{2 + 10}{2}, \dfrac{5 - 1}{2}\right) = (6, 2)$.
- $m_{AB} = \dfrac{-1 - 5}{10 - 2} = -\dfrac{3}{4}$, so the bisector has gradient $\dfrac{4}{3}$.
- $y - 2 = \dfrac{4}{3}(x - 6)$, so $3y - 6 = 4x - 24$ and $4x - 3y - 18 = 0$.
Worked example 3. The point $P$ on this bisector has $y$-coordinate 6. Find $P$ and check that $PA = PB$.
- $4x - 18 - 18 = 0$, so $x = 9$: $P(9, 6)$.
- $PA^2 = 7^2 + 1^2 = 50$ and $PB^2 = 1^2 + 7^2 = 50$, so $PA = PB$.
A square or a rhombus
The diagonals 对角线 of a square bisect each other at right angles, so one diagonal lies on the perpendicular bisector of the other.
The diagonals of a square are also equal. If the step from the centre $E$ to $C$ is $p$ across and $q$ up, the steps from $E$ to the other two corners are $(q, -p)$ and $(-q, p)$: swap the numbers and change one sign.
7.4 Transform relationships to and from straight-line form
Some relationships, such as $y = Ax^n$, give a curve. Taking logarithms changes them into the straight-line form 直线形式 $Y = mX + c$, where $Y$ and $X$ are new variables 变量. The gradient and intercept of that line then give the unknown constants.
The idea
If $Y$ plotted against $X$ is a straight line with gradient $m$ and intercept $c$ on the $Y$-axis, then $Y = mX + c$. Here $Y$ and $X$ can be expressions such as $\lg y$, $y^2$, $\mathrm{e}^y$, $x^3$ or $\ln x$.
From a curve to a straight line
| relationship | take logs | plot | gradient | intercept |
|---|---|---|---|---|
| $y = Ax^n$ | $\lg y = n\lg x + \lg A$ | $\lg y$ against $\lg x$ | $n$ | $\lg A$ |
| $y = Ab^x$ | $\lg y = x\lg b + \lg A$ | $\lg y$ against $x$ | $\lg b$ | $\lg A$ |
With $\ln$ instead of $\lg$, the intercept is $\ln A$, so $A = \mathrm{e}^c$.
From a table of data: work out the new variable (such as $\lg y$) for each value, plot the points, draw a ruled straight line through them, then read the gradient and the intercept from your line.

The step between the two points gives the gradient $\dfrac{0.8}{2} = 0.4$.
Worked example 1. $y = Ax^n$. The graph of $\lg y$ against $\lg x$ is the line above. Find $A$ and $n$.
- $\lg y = n\lg x + \lg A$, so $n$ is the gradient: $n = \dfrac{2.1 - 1.3}{2.5 - 0.5} = 0.4$.
- $1.3 = 0.4 \times 0.5 + \lg A$, so $\lg A = 1.1$ and $A = 10^{1.1} = 12.6$.
From a straight line to an equation
- Find $m$ and $c$ from the two points.
- Write $Y = mX + c$ with the given expressions for $Y$ and $X$.
- Make $y$ the subject if the question asks for it.
Worked example 2. When $y^2$ is plotted against $x^3$, a straight line through $(1, 5)$ and $(3, 9)$ is obtained. Find $y^2$ in terms of $x$.
- $m = \dfrac{9 - 5}{3 - 1} = 2$, and $5 = 2(1) + c$ gives $c = 3$.
- $y^2 = 2x^3 + 3$.
Words in the questions
The exercise sheets for this topic also use these words:
- equidistant 等距离