Equation of a Straight Line (AA SL)
A straight line can be written several different ways, and IB questions often expect you to move fluently between them. This page focuses on setting up an equation from a gradient and a point (or two points), and reading gradients back out of whichever form a question hands you. It's part of the broader Straight Lines topic.
11 questions on this sub-topic.
The forms you need
Covered under IB syllabus reference 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. None of these need memorising as such - they're really the same line, written three ways.
Gradient-intercept form
\[y=mx+c\]
The gradient \(m\) and the \(y\)-intercept \(c\) are both readable straight off this form - the one to aim for as your final answer unless told otherwise.
Point-gradient form
\[y-y_1=m(x-x_1)\]
Use this to build an equation when you know the gradient \(m\) and one point \((x_1,y_1)\) on the line, then rearrange into \(y=mx+c\).
Need the full syllabus wording and formula-booklet reference table? See Straight Lines.
Worked examples
A line has gradient \(3\) and passes through the point \((2,-1)\). Determine its equation, writing your answer in the form \(y=mx+c.\)
Worked solution
Substitute the gradient and point into point-gradient form: \(y-(-1)=3(x-2).\) M1
Expand the right-hand side: \(y+1=3x-6.\) A1
Rearrange to isolate \(y\): \(y=3x-7.\) A1
A company's cost, in dollars, of producing \(x\) items is modelled by a linear function \(C(x)=mx+c.\) It costs $50 to produce \(10\) items and $90 to produce \(20\) items.
(a) Find the equation of \(C(x).\)
(b) Interpret the value of \(c\) in context.
Worked solution
(a) Find the gradient from the two given points: \(m=\dfrac{90-50}{20-10}=4.\) M1
Substitute into point-gradient form: \(C(x)-50=4(x-10).\) M1
Simplify: \(C(x)=4x+10.\) A1
(b) \(c=10.\) A1 This represents the fixed cost - the cost of producing zero items. R1
Find the equation of the perpendicular bisector of the line segment joining \((2,6)\) and \((8,2).\)
Worked solution
\(M=\left(\dfrac{2+8}{2},\dfrac{6+2}{2}\right)=(5,4).\) M1
\(m_1=\dfrac{2-6}{8-2}=-\dfrac23.\) M1
\(m_1\cdot m_2=-1\Rightarrow m_2=\dfrac32.\) A1
\(y-4=\dfrac32(x-5).\) M1
\(y=1.5x-3.5.\) A1
Common mistakes
- 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 only appears once you rearrange into \(y=mx+c\).
- Forgetting to expand the bracket in point-gradient form. \(y-y_1=m(x-x_1)\) is only a finished answer if the question asks for that form specifically - most of the time you still need to multiply out and collect terms to reach \(y=mx+c\).
- Mixing up which coordinate is \(x_1\) and which is \(y_1\). Substituting a point \((3,-2)\) as \(x_1=-2,\ y_1=3\) instead of the other way round silently flips the whole equation.
Ready to practise properly?
11 questions on the equation of a straight line, marked instantly like the real exam.
Quick answers
What forms can the equation of a straight line take?
Gradient-intercept form \(y=mx+c\), general form \(ax+by+d=0\), and point-gradient form \(y-y_1=m(x-x_1)\) when you know the gradient and one point on the line.
How do I find the gradient from the general form \(ax+by+d=0\)?
Rearrange into \(y=mx+c\) first. The gradient is \(-\tfrac{a}{b}\), not \(\tfrac{a}{b}\) - the sign flips because you divide the \(-a\) term by \(b\) when isolating \(y\).