James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout

Straight lines

Gradients, the three forms of the equation of a line, parallel and perpendicular lines, and where lines meet.

Pure 3.1Year 1≈ 45 min to work through
Before you start: gradients and y=mx+c. Shaky on these? See Before you start (GCSE skills check) › Straight lines.

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 from two points or from its equationY1
  • Use the forms y=mx+c, ax+by+d=0 and y−y1=m(x−x1)Y1
  • Use m1=m2 for parallel lines and m1m2=−1 for perpendicular linesY1
  • Find where two lines intersectY1
  • Interpret the gradient and intercept in contextY1

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 the same steepness everywhere. That steepness is its gradient, and once you know the gradient and one point on the line, you can write down its equation.

2.1 Gradient and the three forms

The gradient m measures how much y changes when x increases by 1. It is "rise over run": the change in y divided by the change in x between any two points. A positive gradient slopes up from left to right, a negative gradient slopes down, and a horizontal line has gradient 0.

In context, the gradient is a rate. If a taxi fare is y=1.5x+3, where x is the distance in km, then each extra km costs €1.50 (the gradient), and the fixed charge is €3 (the y-intercept).

Formulae
m=y2−y1x2−x1y=mx+cax+by+d=0y−y1=m(x−x1)

Use y−y1=m(x−x1) when you know a point and the gradient: it saves a step. To find the gradient from ax+by+d=0, rearrange to y=….

Where does point-gradient form come from?

Take any point (x,y) on the line and the known point (x1,y1). The gradient between them must be m, so y−y1x−x1=m. Multiplying both sides by x−x1 gives y−y1=m(x−x1).

The three forms describe the same line. y=mx+c shows the gradient and y-intercept; ax+by+d=0 is the tidy form exam questions often ask for, with integer coefficients; y−y1=m(x−x1) is the quickest to write down.

Worked example 1No calculator
Find the equation of the line through (2,−1) and (6,7).
m=7−(−1)6−2=2
y+1=2(x−2)
y=2x−5

2.2 Parallel and perpendicular lines

Parallel lines have equal gradients. Perpendicular lines have gradients that multiply to −1: if one gradient is m, the other is −1m.

Why −1m?

Rotate a line through 90°. A step of "1 across, m up" becomes "m across, 1 back", so the new gradient is −1m. For example, a line with gradient 2 is perpendicular to a line with gradient −12. Vertical lines (x= constant) have no gradient, so this rule does not apply to them.

Worked example 2No calculator
Find the equation of the line perpendicular to 3x−4y+5=0 through (1,2). Give your answer in the form ax+by+d=0.
Rearrange: y=34x+54, so m=34.
Perpendicular gradient: −43.
y−2=−43(x−1)⇒3y−6=−4x+4
4x+3y−10=0

2.3 Intersections

Two lines meet where both equations are true: solve them simultaneously. With a calculator, graph both and find the intersection.

A pair of lines in 2D either meet at exactly one point, are parallel and never meet (same gradient, different intercept), or are the same line. Solving simultaneously shows which: you get one solution, no solution, or infinitely many.

Worked example 3No calculator
Find where y=2x−5 meets x+3y=6.
Substitute: x+3(2x−5)=6
7x=21, so x=3.
y=2(3)−5=1. The lines meet at (3,1).
Worked example 4 (faded)No calculator
Write y=−23x+4 in the form ax+by+d=0, where a,b,d∈ℤ.
Multiply by 3: 3y= −2x + 12  ← you work this out
Rearrange: 2x + 3y − 12 = 0  ← you work this out
On your Casio ClassWiz Calculator tricks →

To find where two lines meet, open the Equation app → Simultaneous equations with 2 unknowns, and enter each line in the form ax+by=c.

3Explore it

Change the gradient and intercept of the navy line. The green line is perpendicular to it through the point P: notice that the two gradients always multiply to −1.

4Common mistakes & exam tips

Common mistakes

  • Subtracting the coordinates in a different order on the top and bottom of the gradient formula.
  • Reading the gradient of ax+by+d=0 as a: rearrange first.
  • Using −m or 1m for the perpendicular gradient instead of −1m.
  • Leaving fractions in ax+by+d=0 when integers are asked for.

Exam tips

  • If a question says "give your answer in the form ax+by+d=0", the final mark depends on it.
  • In context, the gradient is a rate (e.g. cost per km) and the intercept is a starting value.
  • Check an intersection by substituting into both equations.

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 (−3,4) and (5,0).
0−45−(−3)=−12
FluencyP2
Find the equation of the line with gradient 3 through (−1,2).
y−2=3(x+1), so y=3x+5.
FluencyP3
Find the gradient of 5x−2y=7.
y=52x−72, so m=52.
FluencyP4
Write down the gradient of a line perpendicular to y=−4x+1.
14
Problem solvingP5
A(1,3) and B(5,11). Find the equation of the perpendicular bisector of AB in the form ax+by+d=0.
Midpoint (3,7); gradient of AB is 2, so the bisector has gradient −12: y−7=−12(x−3), which gives x+2y−17=0.
Problem solvingP6
The lines kx+2y=5 and 3x−y=1 are perpendicular. Find k.
Gradients −k2 and 3: −3k2=−1, so k=23.

6Exam-style questions

Original exam-style questions with full markschemes. Edexcel papers allow a calculator throughout, but questions labelled “No calculator” practise exact working. Allow about 1.2 minutes per mark.

Question 1No calculator[6 marks]

The line L1 passes through A(−2,5) and B(4,−1).

  • (a)Find the gradient of L1.[2]
  • (b)Find the equation of L1.[2]
  • (c)The line L2 is perpendicular to L1 and passes through B. Find the equation of L2 in the form ax+by+d=0.[2]
(a)
−1−54−(−2)M1
−1A1
(b)
y−5=−1(x+2)M1
y=−x+3A1
(c)
Gradient 1: y+1=x−4M1
x−y−5=0A1
Question 2No calculator[6 marks]

L1 has equation 2x+y=7 and L2 has equation x−3y=7.

  • (a)Find the coordinates of the point where L1 and L2 intersect.[3]
  • (b)Find the area of the triangle formed by L1, L2 and the y-axis.[3]
(a)
Attempt to solve simultaneously, e.g. x=7+3y⇒14+7y=7M1
y=−1A1
x=4: (4,−1)A1
(b)
y-intercepts 7 and −73A1
Area =12×283×4M1
563A1
Question 3Calculator[5 marks]

A taxi charges C=3.5+1.2d euros for a journey of d km.

  • (a)Interpret the numbers 3.5 and 1.2 in this context.[2]
  • (b)Find the cost of a 12 km journey.[1]
  • (c)A second company charges C=5+1.05d. Find the distance for which both companies charge the same.[2]
(a)
3.5: fixed charge (€3.50) at the startA1
1.2: cost per kilometre (€1.20)A1
(b)
€17.90A1
(c)
3.5+1.2d=5+1.05dM1
d=10 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 real Edexcel A level questions. Past papers and markschemes are on the Pearson website.

PaperQuestionFocusDifficulty
June 2018 · Paper 1Q6(a)Equation of a line perpendicular to a tangent★★☆
Specimen · Paper 2Q8Perpendicular lines and the area of a rectangle★★☆
June 2025 · Paper 1Q12Where a straight line meets a rational curve★★★
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