Equation of a Straight Line (AA HL)

Every straight line can be written three different ways, and choosing the right one for the information you're given saves a lot of algebra. This page focuses on those three forms and on building an equation from two points or from a gradient and a point, as one narrow slice of the wider Straight Lines topic.

17 questions on this sub-topic.

Practise the equation of a line → Try exam-style questions

The three forms

Covered under IB syllabus reference SL2.1: the gradient-intercept, general, and point-gradient forms of a line, plus gradient and intercepts. None of these are printed in the formula booklet - they're treated as prior knowledge.

Gradient-intercept form

\[y=mx+c\]

Best when you know (or want) the gradient \(m\) and the \(y\)-intercept \(c\) directly.

General form

\[ax+by+d=0\]

Whole-number coefficients; rearrange to \(y=mx+c\) to read off the gradient \(-\tfrac{a}{b}\).

Point-gradient form

\[y-y_1=m(x-x_1)\]

The fastest route from "a gradient and a point" to a full equation - expand and simplify from there.

Need the full syllabus wording and formula-booklet reference table? See Straight Lines.

Worked examples

1
Medium
No calc
[4 marks]

Find the equation of the line through \((1,4)\) and \((3,10).\)

(a)(i) State the gradient.

(a)(ii) State the y-intercept.

Worked solution

(a)(i) \(m=\dfrac{10-4}{3-1}\) M1
\(=3.\) A1

(a)(ii) \(y-4=3(x-1)\Rightarrow y\) M1
\(=3x+1.\) A1

M1 Gradient A1 \(m=3\) M1 Use a point A1 Equation
2
Hard
No calc
[4 marks]

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}.\) M1 A1

(a)(ii) \(y-1=\tfrac32(x-4)\Rightarrow y\) M1
\(=\tfrac32x-5.\) A1

M1 Segment gradient A1 \(m=3/2\) M1 Point-gradient A1 Equation
3
Easy
No calc
[3 marks]

Find the equation of the line parallel to \(y=3x+1\) passing through \((0,4).\)

(a)(i) State the gradient.

(a)(ii) State the y-intercept.

Worked solution

(a)(i) Parallel lines have equal gradient \(m=3.\) M1

(a)(ii) Through \((0,4)\): \(c=4.\) A1
\(y=3x+4.\) A1

M1 Same gradient A1 Intercept A1 Equation
4
Medium
No calc
[4 marks]

Find the equation of the line perpendicular to \(3x-y=2\) passing through \((6,1).\)

(a)(i) State the gradient.

(a)(ii) State the y-intercept.

Worked solution

(a)(i) Gradient of \(3x-y=2\) is \(3.\) Perpendicular gradient \(=-\tfrac13.\) M1A1

(a)(ii) \(y-1=-\tfrac13(x-6)\Rightarrow y\) M1
\(=-\tfrac13x+3.\) A1

M1 Negative reciprocal A1 \(-\tfrac13\) M1 Point-gradient A1 Equation

Common mistakes

Ready to practise properly?

17 equation-of-a-line questions, marked instantly like the real exam.

Quick answers

How do I find the equation of a line through two points?

First find the gradient \(m=\dfrac{y_2-y_1}{x_2-x_1}\), then substitute that gradient and either point into \(y-y_1=m(x-x_1)\) and rearrange into \(y=mx+c\).

What's the difference between gradient-intercept and general form?

Gradient-intercept form, \(y=mx+c\), shows the gradient and \(y\)-intercept directly. General form, \(ax+by+d=0\), uses whole-number coefficients and needs rearranging (gradient \(=-\tfrac{a}{b}\)) before either feature is visible. A GDC can also confirm a gradient graphically - see Straight Lines.

← Back to Analysis & Approaches HL topics