The equation of a straight line
IGCSE Mathematics · Coordinate geometry
Two forms, one line
$$y=mx+c\qquad\text{and}\qquad ax+by=d$$The first shows the gradient $m$ and the $y$-intercept $c$ immediately. The second is the form Cambridge often gives, and you must rearrange it before you can read the gradient: $3x+4y=24$ becomes $y=-\tfrac{3}{4}x+6$, so $m=-\tfrac{3}{4}$.
Building an equation from a gradient and a point
Substitute the point into $y=mx+c$ and solve for $c$. Through $(2,-4)$ with $m=3$:
$$-4=3(2)+c\;\Longrightarrow\;c=-10\;\Longrightarrow\;y=3x-10$$Parallel and perpendicular
- Parallel lines have the same gradient.
- Perpendicular gradients multiply to $-1$: $m_{1}m_{2}=-1$, so $m_{2}=-\dfrac{1}{m_{1}}$.
Turning $\tfrac{3}{2}$ into a perpendicular gradient means doing two things: invert it and change its sign, giving $-\tfrac{2}{3}$. Doing only one of the two is the standard error.
Intercepts
The line crosses the $x$-axis where $y=0$ and the $y$-axis where $x=0$. Set the other variable to zero — never both.
Worked example: perpendicular line through a point
Find the equation of the line passing through $(6,-2)$ and perpendicular to the line $2y=3x+8$.
Solution
Step 1 — rearrange the given line into the form $y=mx+c$. Do not read the gradient from an unsimplified form.
$$2y=3x+8\;\Longrightarrow\;y=\tfrac{3}{2}x+4\;\Longrightarrow\;m_{1}=\tfrac{3}{2}$$Step 2 — the perpendicular gradient: flip and change sign.
$$m_{2}=-\frac{2}{3}$$Check: $\tfrac{3}{2}\times\left(-\tfrac{2}{3}\right)=-1$ ✓.
Step 3 — substitute the point to find $c$.
$$-2=-\tfrac{2}{3}(6)+c=-4+c\;\Longrightarrow\;c=2$$So the equation is $y=-\dfrac{2}{3}x+2$, or $3y+2x=6$ if the question asks for integer form.
These three steps are the fixed template for every "perpendicular through a point" question. Step 1 is often skipped when the equation already looks like the form $y=mx+c$ — but $2y=3x+8$ only looks like it; the real gradient is not $3$.
Worked example: perpendicular bisector of a line segment
$A(-1,2)$ and $B(5,10)$. Find the equation of the perpendicular bisector of $AB$.
Solution
A perpendicular bisector requires two properties: it passes through the midpoint and it is perpendicular to $AB$. Missing either one gives a different line.
Step 1 — the midpoint.
$$M=\left(\frac{-1+5}{2},\;\frac{2+10}{2}\right)=(2,\;6)$$Step 2 — the gradient of $AB$.
$$m_{AB}=\frac{10-2}{5-(-1)}=\frac{8}{6}=\frac{4}{3}$$Step 3 — the perpendicular gradient.
$$m=-\frac{3}{4}$$Step 4 — substitute the midpoint to find $c$.
$$6=-\tfrac{3}{4}(2)+c=-1.5+c\;\Longrightarrow\;c=7.5$$$$y=-\tfrac{3}{4}x+7.5\qquad\text{or}\qquad 4y+3x=30$$Check by meaning. The perpendicular bisector consists of all points equidistant from $A$ and $B$. Try the point $(10,0)$ on the line just found: the distance to $A$ is $\sqrt{121+4}=\sqrt{125}$, to $B$ is $\sqrt{25+100}=\sqrt{125}$ ✓. This check catches both midpoint errors and gradient errors.