Equation of a Line (AI SL)
Straight-line equations show up everywhere in coordinate geometry: as the boundary between two Voronoi cells, as a road or a wire on a map, or simply as \(y=mx+c\) waiting to be found from a point and a gradient. This page pulls together the point-gradient form, testing for perpendicular lines, and finding where two lines cross, with worked examples and the errors that cost marks. It's part of the broader Coordinate Geometry & Voronoi topic.
53 questions on this sub-topic.
The key formulas
Covered under IB syllabus reference SL3.5: equations of perpendicular bisectors, given either two points, or the equation of a line segment and its midpoint. Neither formula below is in the formula booklet - both are treated as prior knowledge you're expected to know.
Line through a point
\(y-y_1=m(x-x_1)\)
Use when you know one point on the line and its gradient. Expand and rearrange to reach \(y=mx+c\) if that's the form asked for.
Not in the formula booklet - prior knowledgePerpendicular lines
\(m_1\times m_2=-1\)
Two gradients multiply to \(-1\) exactly when the lines are perpendicular - so \(m_2\) is the negative reciprocal of \(m_1\).
Not in the formula booklet - prior knowledgeNeed the fuller syllabus wording and formula-booklet reference table? See Coordinate Geometry & Voronoi.
Worked examples
A line has equation \(y=-2x+5.\)
Find the equation of the line perpendicular to it that passes through \((4, 1)\), giving your answer in the form \(y=mx+c.\)
Worked solution
The given line has gradient \(-2\), so the perpendicular gradient is \(m=\tfrac12.\) M1
\(1=\tfrac12(4)+c\Rightarrow 1=2+c\Rightarrow c\) M1 \(=-1.\) A1
\(y=\tfrac12x-1.\) A1
Find the point of intersection of \(y=2x+1\) and \(y=-x+7.\)
Worked solution
At the intersection both \(y\)-values match:
\(2x + 1 = -x + 7 \Rightarrow 3x = 6 \Rightarrow x = 2.\) M1 A1
\(y = 2(2) + 1 = 5\). Intersection \((2, 5)\). M1 A1
Find the equation of the line through \((4,1)\) parallel to the segment joining \((0,0)\) and \((2,3).\)
(a)(i) State the gradient.
(a)(ii) State the y-intercept.
Worked solution
(a)(i) Gradient of segment \(=\tfrac{3}{2}.\) M1A1
(a)(ii) \(y-1=\tfrac32(x-4)\Rightarrow y\) M1
\(=\tfrac32x-5.\) A1
Common mistakes
- Taking the reciprocal without changing the sign. The perpendicular gradient is the negative reciprocal - if the original gradient is \(\tfrac23\), the perpendicular gradient is \(-\tfrac32\), not \(\tfrac32\).
- Substituting the point the wrong way round. In \(y-y_1=m(x-x_1)\), \(x_1\) and \(y_1\) come from the given point - swapping which coordinate goes where produces an equation that doesn't actually pass through it.
- Solving the wrong equation for an intersection. Setting one line's expression equal to a constant, rather than equal to the other line's expression, finds a point on only one line, not the point they share.
Ready to practise properly?
53 line-equation questions, marked instantly like the real exam.
Quick answers
How do you find the equation of a line through a point with a given gradient?
Use \(y-y_1=m(x-x_1)\), substituting the known gradient \(m\) and the coordinates of the point, then rearrange into \(y=mx+c\) if that form is asked for.
How do you find where two lines cross?
Set the two expressions for \(y\) equal to each other and solve for \(x\), then substitute that \(x\)-value back into either line's equation to find \(y\).