Straight Lines (AA SL)
A straight line can be described completely by its gradient and one piece of positioning information, such as a point it passes through or its \(y\)-intercept. This topic covers the different forms of a line's equation, finding gradients and midpoints from coordinates, and the gradient conditions that identify parallel and perpendicular lines.
What the syllabus says
This topic maps onto one point in the official IB Analysis & Approaches syllabus, shared with Applications & Interpretation.
| Code | Syllabus content |
|---|---|
| SL2.1 | Different forms of the equation of a straight line: gradient-intercept form \(y=mx+c\); general form \(ax+by+d=0\); point-gradient form \(y-y_1=m(x-x_1)\), given the gradient and a point. Gradient and intercepts. Parallel lines: \(m_1=m_2\). Perpendicular lines: \(m_1\times m_2=-1\). |
This also draws on the midpoint of a line segment and the distance between two points from the prior-knowledge section of the syllabus.
Key terms
Five words worth knowing cold before you touch the formulas below - each with a worked example showing exactly what it means.
What is the gradient of a line?
The gradient measures how steep a line is - the change in \(y\) divided by the change in \(x\) between any two points on it. A positive gradient slopes up left to right; a negative gradient slopes down.
e.g. between \((1,2)\) and \((5,10)\), gradient \(=\dfrac{10-2}{5-1}=\dfrac{8}{4}=2\).
What is the y-intercept?
The \(y\)-intercept is the value of \(y\) where a line crosses the \(y\)-axis, i.e. where \(x=0\). In gradient-intercept form \(y=mx+c\), the \(y\)-intercept is simply \(c\).
e.g. the line \(y=2x+5\) has \(y\)-intercept \(c=5\), crossing the \(y\)-axis at \((0,5)\).
What is the midpoint of a line segment?
The midpoint is the point exactly halfway between two given points, found by averaging their \(x\)-coordinates and their \(y\)-coordinates separately.
e.g. midpoint of \((-2,1)\) and \((6,7)\) is \(\left(\dfrac{-2+6}{2},\dfrac{1+7}{2}\right)=(2,4)\).
What does it mean for two lines to be parallel?
Parallel lines never meet because they have exactly the same gradient. They can have different \(y\)-intercepts (different lines) or the same intercept (which would make them identical).
e.g. \(y=3x+1\) and \(y=3x-4\) are parallel, since both have gradient \(3\).
What does it mean for two lines to be perpendicular?
Perpendicular lines cross at a right angle. Their gradients multiply to give \(-1\), so the perpendicular gradient is always the negative reciprocal of the original.
e.g. if \(m_1=\dfrac34\), the perpendicular gradient is \(m_2=-\dfrac43\), since \(\dfrac34\times\left(-\dfrac43\right)=-1\).
Key formulas
Six formulas cover every question on this topic. The two tables below summarise all of them at a glance - the explanations underneath go into more depth on each one.
Formula reference
The equation forms and gradient conditions below are on the official formula booklet; the midpoint and distance formulas are assumed prior knowledge and aren't listed separately.
| Formula | Used for | Booklet? |
|---|---|---|
| \(y=mx+c\) | Gradient-intercept form | ✓ Yes |
| \(ax+by+d=0\) | General form | ✓ Yes |
| \(y-y_1=m(x-x_1)\) | Point-gradient form | ✓ Yes |
| \(m_1=m_2\) | Parallel line condition | ✓ Yes |
| \(m_1\times m_2=-1\) | Perpendicular line condition | ✓ Yes |
| \(m=\dfrac{y_2-y_1}{x_2-x_1}\) | Gradient between two points | Not in booklet - prior knowledge |
Parallel vs perpendicular
Both conditions relate two gradients, but in opposite ways - one says the gradients match, the other says they're negative reciprocals of each other.
| Feature | Parallel | Perpendicular |
|---|---|---|
| Gradient condition | \(m_1=m_2\) | \(m_1\times m_2=-1\) |
| Angle between lines | \(0^\circ\) (never meet) | \(90^\circ\) |
| Given \(m_1=2\), find \(m_2\) | \(m_2=2\) | \(m_2=-\tfrac12\) |
| Example pair | \(y=2x+1,\ y=2x-3\) | \(y=2x+1,\ y=-\tfrac12x+4\) |
Forms of a line's equation
Each form is most convenient for a different starting piece of information - the algebra always simplifies down to \(y=mx+c\) if needed.
Gradient-intercept form
\[y=mx+c\]
Best when you know the gradient \(m\) and \(y\)-intercept \(c\) directly.
✓ In the formula bookletPoint-gradient form
\[y-y_1=m(x-x_1)\]
Best when you know the gradient and any single point \((x_1,y_1)\) on the line.
✓ In the formula bookletGeneral form
\[ax+by+d=0\]
Useful for reading a gradient as \(-\tfrac{a}{b}\) directly from the coefficients without rearranging.
✓ In the formula bookletParallel and perpendicular gradients
These two conditions let you find a second line's gradient instantly, given the first line's gradient and a relationship between the lines.
Parallel condition
\[m_1=m_2\]
Parallel lines share exactly the same gradient.
✓ In the formula bookletPerpendicular condition
\[m_1\times m_2=-1\]
Take the negative reciprocal of the first gradient to get the second.
✓ In the formula bookletWorked examples
Two full exam-style questions, marked exactly like the real thing. Try each one yourself before checking the worked solution.
The points are \(A(1,\,2)\) and \(B(5,\,10)\).
(a) Find the gradient of \([AB]\).
(b)(i) Find the equation of the line through \(A\) and \(B\), giving your answer in the form \(y=mx+c\), and state the value of \(m\).
(b)(ii) State the value of \(c\).
Worked solution
(a) Gradient \(=\dfrac{10-2}{5-1}=\dfrac{8}{4}\) M1
\(=2.\) A1
(b)(i) Through \((1,2):\ y-2=2(x-1)\Rightarrow y=2x,\) so \(m\) M1
\(=2.\) A1
(b)(ii) \(c=0.\) A1
The points are \(A(-2,\,1)\) and \(B(6,\,7)\).
(a) Find the coordinates of the midpoint \(M\) of \([AB]\).
(b) Find the gradient of \([AB]\).
(c)(i) Hence find the gradient \(m\) of the perpendicular bisector of \([AB]\).
(c)(ii) Find the value of \(c\), giving the equation in the form \(y=mx+c\).
(d) The perpendicular bisector meets the \(x\)-axis at \(P\). Find the coordinates of \(P\).
Worked solution
(a) \(M=\left(\tfrac{-2+6}{2},\tfrac{1+7}{2}\right)\) M1
\(=(2,\,4).\) A1
(b) Gradient \(=\dfrac{7-1}{6-(-2)}=\dfrac{6}{8}\) M1
\(=\tfrac34.\) A1
(c)(i) Perpendicular gradient \(=-\tfrac43.\) M1 A1
(c)(ii) Through \((2,4):\ y-4=-\tfrac43(x-2)\Rightarrow y=-\tfrac43x+\tfrac{20}{3},\) so \(c=\tfrac{20}{3}.\) A1
(d) \(y=0:\ \tfrac43x=\tfrac{20}{3}\Rightarrow x\) M1
\(=5,\) so \(P(5,\,0).\) A1
Common mistakes
The four slip-ups that account for most of the marks lost on this topic - worth reading before you start practising, not just after you get one wrong.
- Forgetting the negative reciprocal for perpendicular gradients. A gradient of \(\tfrac34\) gives a perpendicular gradient of \(-\tfrac43\), not \(\tfrac43\) - both the sign and the flip matter.
- Swapping the coordinates in the gradient formula. \(m=\dfrac{y_2-y_1}{x_2-x_1}\) needs both differences taken in the same order - mixing \((y_2-y_1)\) with \((x_1-x_2)\) flips the sign of the answer.
- Reading the gradient straight off general form without rearranging. In \(ax+by+d=0\), the gradient is \(-\tfrac{a}{b}\), not \(\tfrac{a}{b}\) - the minus sign comes from the rearrangement into \(y=mx+c\).
- Assuming parallel lines are identical. \(m_1=m_2\) only guarantees the lines never meet - they can still have different \(y\)-intercepts and so be distinct, non-overlapping lines.
Using your GDC
Straight-line questions are mostly direct algebraic substitution into the gradient and equation formulas, so most exam questions on this topic don't call for a calculator at all. Where a GDC does help is graphing a line to sanity-check a gradient or intercept you've found by hand, or using the calculator's linear regression feature when a "line of best fit" is being modelled from data rather than two exact points. See the full GDC guide for model-specific button sequences across TI-84, TI-Nspire, and Casio.
Ready to practise properly?
Straight lines questions, marked instantly like the real exam.
Quick answers
The questions students on this topic ask most often.
What's the difference between gradient-intercept form and point-gradient form?
Gradient-intercept form, \(y=mx+c\), is best when you already know the gradient \(m\) and \(y\)-intercept \(c\). Point-gradient form, \(y-y_1=m(x-x_1)\), is best when you know the gradient and any single point on the line - it doesn't require you to know the \(y\)-intercept up front.
How do I find the gradient of a perpendicular line?
Take the negative reciprocal of the original gradient: if the given line has gradient \(m_1\), the perpendicular gradient \(m_2\) satisfies \(m_1\times m_2=-1\), so \(m_2=-\dfrac{1}{m_1}\).
Do parallel lines always have the same y-intercept?
No. Parallel lines only need the same gradient - their \(y\)-intercepts can be different, or the same, which would make them the same line. Same gradient and different intercept means the lines never meet.
Is this topic examined without a calculator?
Yes, most straight line questions are calculator-free - finding gradients, midpoints and equations of lines is direct algebraic substitution. Your GDC is more useful for checking a sketch or for later topics that build on straight lines, like regression. See the GDC guide for model-specific instructions.
Sub-topics
Straight Lines broken down into its individual skills, each with its own focused page.
Related topics
More Functions topics from the same AA SL syllabus unit, in case you want to keep going.