James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI SL › Functions › Straight lines

Straight lines

Gradients, the three forms of the equation of a line, parallel and perpendicular lines, and where lines meet. In AI SL, lines are usually models, so you also need to say what the gradient and the intercept mean, and use the GDC to find intersections.

SL 2.1Paper 1Paper 2GDC allowed≈ 50 min to work through
Before you start: gradient and y=mx+c (Before you start › Straight lines) and solving two equations on the GDC (Solving equations with technology).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Find the gradient of a line through two pointsSL 2.1
  • Use the forms y=mx+c, ax+by+d=0 and y−y1=m(x−x1)SL 2.1
  • Find the intercepts of a line with the axesSL 2.1
  • Use parallel lines (equal gradients) and perpendicular lines (m1m2=−1)SL 2.1
  • Find where two lines intersect, on the GDCSL 2.1
  • Interpret the gradient and intercept of a linear model in contextSL 2.1, 2.5

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

A straight line has a constant rate of change: every step of 1 in x changes y by the same amount, the gradient. That is why lines model so many real situations: a fixed charge plus a cost per kilometre, a phone plan, a steady fall in temperature. Read every line as "starting value plus rate".

2.1 Gradient and the three forms of a line

Gradient and equations of a line In formula booklet
m=y2−y1x2−x1

Gradient–intercept form: y=mx+c
General form: ax+by+d=0
Point–gradient form: y−y1=m(x−x1)

Worked example 1Paper 1
Find the equation of the line through (2,5) and (6,13), in the form y=mx+c.
m=13−56−2=2
y−5=2(x−2)
Point–gradient form with the point (2,5) is the quickest way to the equation.
y=2x+1
Worked example 2Paper 1
The line L has equation 3x+4y−12=0. Find (a) its gradient (b) the points where it meets the axes.
(a) 4y=−3x+12⇒y=−0.75x+3, so m=−0.75
Rearrange to y=…: the coefficient of x is the gradient.
(b) x=0⇒y=3: (0,3). y=0⇒x=4: (4,0).
To graph a line given in general form on the GDC, rearrange it to y=… first.

2.2 Parallel and perpendicular lines

Parallel and perpendicular Not in booklet: learn it

Parallel lines have equal gradients: m1=m2.
Perpendicular lines have gradients that multiply to −1: m1m2=−1, so m2=−1m1. Flip the fraction and change the sign: the perpendicular to a gradient of 23 has gradient −32.

Worked example 3Paper 1
Find the equation of the line perpendicular to y=2x+1 that passes through (4,3). Give your answer in the form ax+by+d=0, where a,b,d∈Z.
Perpendicular gradient: −12
y−3=−12(x−4)⇒y=−0.5x+5
x+2y−10=0
Multiply by 2 to clear the fraction, then move everything to one side.

2.3 Where lines meet

The intersection of two lines is the solution of their equations together. On the GDC you can graph both lines and use Intersection, or solve the two equations as a system. Graphing has the advantage that you can see the answer makes sense.

Worked example 4Paper 1
Find the point of intersection of y=2x+1 and x+2y−10=0.
Graph f1(x)=2x+1 and f2(x)=−0.5x+5
Rearrange the second line to y=… so the GDC can graph it.
menu → Analyze Graph → Intersection: (1.6, 4.2)
Or Solve System of Linear Equations with 2x−y=−1 and x+2y=10.
Worked example 5 (faded)Paper 1
Find the equation of the line parallel to y=−3x+7 that passes through (2,−1).
Gradient = −3  ← you work this out
y+1=−3(x−2)⇒y= −3x + 5  ← you work this out

2.4 Lines as models

Worked example 6Paper 2
A gym charges a joining fee plus a fixed amount each month. After 3 months a member has paid €135 in total; after 8 months, €260. (a) Find a linear model C=mt+c. (b) Interpret m and c. (c) Find when the total first exceeds €500.
(a) m=260−1358−3=25; 135=25(3)+c⇒c=60. C=25t+60
(b) m=25: the monthly fee is €25. c=60: the joining fee is €60.
Always give the units and the context, not just "the gradient".
(c) 25t+60>500⇒t>17.6, so after 18 months
Months are whole numbers here, so round up.
On your TI-Nspire Calculator tricks →

Graphing a line: on a Graphs page, type the equation after f1(x)= and press enter. Lines in the form ax+by+d=0 must be rearranged to y=… first. Intersection: menu → Analyze Graph → Intersection, then click to the left and to the right of the crossing point. If you can not see the crossing, change the window (menu → Window/Zoom → Zoom – Fit is a good start).

3Explore it

Change the gradient and intercept of each line. The readout tells you whether the lines are parallel or perpendicular, and where they meet.

4Common mistakes & exam tips

Common mistakes

  • Subtracting the coordinates in a different order on the top and the bottom of the gradient formula.
  • Reading the gradient of 3x+4y−12=0 as 3. Rearrange to y=… first: it is −34.
  • Taking the perpendicular gradient as 1m or −m. It is −1m.
  • Giving ax+by+d=0 with fractions when the question asks for integers.
  • Interpreting the gradient as "the slope" with no context or units.

Exam tips

  • The gradient formula and the three forms of a line are in the formula booklet; m1m2=−1 is not.
  • "Hence find the point of intersection": write the two equations you solved, then the answer from the GDC.
  • For a perpendicular bisector (Topic 3), you need the midpoint and the perpendicular gradient: practise both here.
  • In a linear model, c is the value when the input is 0: often a fixed charge or a starting amount.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Find the gradient of the line through (−1,4) and (3,−2).
−64=−1.5
FluencyP2
Write y=23x−4 in the form ax+by+d=0, where a,b,d∈Z.
2x−3y−12=0
FluencyP3
Write down the gradient of a line perpendicular to y=−4x+1.
14
FluencyP4
Find the x-intercept of 2x−5y+10=0.
y=0⇒x=−5: (−5,0)
Problem solvingP5
Find the point of intersection of y=3x−2 and 2x+y=13.
(3,7)
Problem solvingP6
A plumber charges €45 for a 1-hour job and €105 for a 3-hour job. Assuming a linear model, find the call-out charge and the hourly rate.
Rate €30 per hour; call-out charge €15

6Exam-style questions

Original questions in the style of the IB Maths AI SL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[7 marks]

The points A(−2,3) and B(4,6) lie on the line L1.

  • (a)Find the gradient of L1.[2]
  • (b)The line L2 is perpendicular to L1 and passes through C(1,−1). Find the equation of L2 in the form ax+by+d=0, where a,b,d∈Z.[3]
  • (c)Find the coordinates of the point where L1 and L2 intersect.[2]
(a)
6−34−(−2)(M1)
0.5A1
(b)
gradient −2(A1)
y+1=−2(x−1)(M1)
2x+y−1=0A1
(c)
L1: y=0.5x+4; attempt to solve with L2(M1)
(−1.2, 3.4)A1
Question 2Paper 1[6 marks]

Taxi company A charges C=1.8d+3.5 euros for a journey of d km.

  • (a)Interpret the value 1.8 in context.[1]
  • (b)Find the cost of a 12 km journey.[1]
  • (c)Company B charges C=2.2d+1.5. Find the distance for which the two companies charge the same.[2]
  • (d)Determine which company is cheaper for a 20 km journey, and by how much.[2]
(a)
the cost per km is €1.80A1
(b)
€25.10A1
(c)
1.8d+3.5=2.2d+1.5(M1)
d=5 kmA1
(d)
A: €39.50; B: €45.50(M1)
A is cheaper, by €6A1
Question 3Paper 2[7 marks]

A straight road passes through the towns P(0,2) and Q(8,6). A farm is at F(6,−1). Distances are in km.

  • (a)Find the equation of the road in the form y=mx+c.[2]
  • (b)Find the equation of the line through F perpendicular to the road.[2]
  • (c)Find the point on the road that is closest to the farm.[2]
  • (d)Find the shortest distance from the farm to the road.[1]
(a)
m=6−28−0=0.5(M1)
y=0.5x+2A1
(b)
gradient −2(M1)
y=−2x+11A1
(c)
solving 0.5x+2=−2x+11(M1)
(3.6, 3.8)A1
(d)
2.42+4.82=5.37 kmA1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try these real IB Maths AI SL questions. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
Nov 2021 · Paper 1Q4Kite on axes: gradients, a perpendicular line, an intercept★★☆
May 2022 · TZ1 · Paper 1Q4Road through two towns: equation of the line, coordinate of a third town★★☆
May 2026 · TZ1 · Paper 1Q13Point on a road closest to a factory: perpendicular line and intersection★★☆
May 2023 · TZ1 · Paper 2Q1Earth temperatures: line through two points, then regression and r★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake