Gradient formula: m = (y₂ − y₁) / (x₂ − x₁)
The gradient formula is gradient m = (y₂ − y₁) / (x₂ − x₁).
What each letter means
- \(m\) the gradient (slope) of the line
- \((x_1,\ y_1),\ (x_2,\ y_2)\) two points on the line
When to use it
To find how steep a line is from two points on it, before writing its equation y − y₁ = m(x − x₁).
Worked example
Find the gradient of the line through \((-1,4)\) and \((3,-8)\), and the gradient of a line perpendicular to it.
- \(m=\dfrac{-8-4}{3-(-1)}=\dfrac{-12}{4}\)
- Perpendicular gradient \(=-\dfrac{1}{m}\)
Answer: \(m=-3\); perpendicular gradient \(\tfrac13\)
Common mistake
Putting the x difference on top. Gradient is rise over run: change in y ÷ change in x.
On your course
| Course | In the exam |
|---|---|
| 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 |
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
Questions
What is the gradient formula?
The gradient formula is gradient m = (y₂ − y₁) / (x₂ − x₁). m: the gradient (slope) of the line; (x₁, y₁), (x₂, y₂): two points on the line.
Is the gradient formula given in the exam?
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. This comes from our own IB Maths formula sheets; your teacher has the official booklet.
What are the gradients of parallel and perpendicular lines?
Parallel lines have equal gradients. Perpendicular gradients multiply to −1, so a line perpendicular to gradient m has gradient −1/m.
Our own wording, examples and card, checked by IB Math Revision. Not produced or endorsed by the International Baccalaureate Organization.