Equation of a straight line: y = mx + c
The equation of a straight line is y = mx + c, or y − y₁ = m(x − x₁) through the point (x₁, y₁).
What each letter means
- \(m\) the gradient (slope)
- \(c\) the y-intercept: where the line crosses the y-axis
- \((x_1,\ y_1)\) a point on the line
When to use it
In IB Maths, for tangents and normals in AA, for perpendicular bisectors in AI's Voronoi diagrams, and in the form ax + by + d = 0. A line fitted to data in AI is a linear model: read m as a rate in context.
Worked example
Find the equation of the line through \((2,-1)\) and \((5,8)\) in the form \(y=mx+c\).
- \(m=\dfrac{8-(-1)}{5-2}=\dfrac{9}{3}=3\)
- \(y-(-1)=3(x-2)\), so \(y+1=3x-6\)
Answer: \(y=3x-7\)
Common mistake
Using the original gradient for a perpendicular bisector in a Voronoi question. Its gradient is −1/m, through the midpoint of the two sites.
Fix it with practice: Skill Builder: Coordinate Geometry (free account).
Try one yourself
One quick IB Maths question on the equation of a straight line. No sign-in needed.
Get 5 more like this — freeGoogle, Microsoft or email. No card needed.
On your IB Maths course
| Course | In the exam |
|---|---|
| AA SL All IB AA SL formulas by topic | In the IB formula booklet |
| AI SL All IB AI SL formulas by topic | In the IB formula booklet |
| AA HL All IB AA HL formulas by topic | In the IB formula booklet |
| AI HL All IB AI HL formulas by topic | In the IB formula booklet |
From our own IB Maths formula sheets, in our words. The IB gives its booklet to schools, so we checked against our own copy: your teacher has the official one. Official: IB DP Mathematics page.
Practise and revise
- Practise AA SL equations of straight lines questions
- Practise AI SL coordinate geometry questions
- Revise Linear functions (AI SL)
- Print AA SL one-page formula sheet
IB Maths FAQ
Is the equation of a straight line in the IB formula booklet?
AA SL: in the IB formula booklet. AI SL: in the IB formula booklet. AA HL: in the IB formula booklet. AI HL: in the IB formula booklet.
What do m and c mean in a linear model?
m is the change in y for each increase of 1 in x, with units, and c is the value of y when x = 0, which may mean nothing if x = 0 is outside the data.
Our own wording, examples and card, checked by IB Math Revision. Not produced or endorsed by the International Baccalaureate Organization.