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

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.

m = 3/2 m = −2/3 (3/2) × (−2/3) = −1 Perpendicular = flip AND change sign
Two things, not one: flip the fraction and then change the sign. Do both and the product always comes out as $-1$ — and a product of $-1$ is exactly the three-second self-check.

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.

Common mistake

Reading the gradient from an unsimplified equation. The question gives $2y=3x+8$ and the candidate immediately writes $m=3$ because the number $3$ is standing exactly where the eye is used to looking. From there the perpendicular gradient becomes $-\tfrac{1}{3}$, and the whole question goes wrong — but every step after the broken one is carried out correctly, so the working looks very tidy and the writer sees nothing amiss. The same kind of error: reading $m=3$ from $3x+4y=24$. The one blocking rule, with no exceptions: until there is exactly one $y$ standing alone on the left side, you may not read off the gradient.

Key takeaway

Every question about straight lines reduces to two numbers: a gradient and a point. To take the gradient you must first rearrange to $y=mx+c$; to switch to perpendicular you flip and change sign; once you have a point, substitute to find $c$. Check with the product of gradients equal to $-1$, or by substituting the very point given in the question.

← Gradient, length and midpoint · All IGCSE Mathematics lessons · Practice IGCSE Mathematics questions (free, instant scoring) · Putting it together: intersections and proofs →