What you'll learn
- How to calculate and interpret the gradient of a straight line.
- How to find equations using y=mx+cy=mx+cy=mx+c, y−y1=m(x−x1)y-y_1=m(x-x_1)y−y1=m(x−x1) and ax+by+c=0ax+by+c=0ax+by+c=0.
- How gradients identify parallel and perpendicular lines.
- How straight lines can model relationships in real situations.
Coordinates and straight lines
A point in the coordinate plane is written as (x,y)(x,y)(x,y). The first coordinate gives its horizontal position, and the second gives its vertical position.
A straight line is a set of points following a constant direction. Its steepness does not change, so it has a constant gradient.
Gradient
Gradient
The gradient, usually written as mmm, measures the steepness and direction of a straight line. It is the change in yyy divided by the corresponding change in xxx:
m=change in ychange in x.m=\frac{\text{change in }y}{\text{change in }x}.m=change in xchange in y.For two distinct points (x1,y1)(x_1,y_1)(x1,y1) and (x2,y2)(x_2,y_2)(x2,y2) on a non-vertical line,
m=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.m=x2−x1y2−y1.A positive gradient means the line rises from left to right. A negative gradient means it falls from left to right. A horizontal line has gradient zero.
The gradient can be visualised as the vertical rise divided by the horizontal run.

Finding a gradient from two points
Find the gradient of the line through A(−2,5)A(-2,5)A(−2,5) and B(4,−7)B(4,-7)B(4,−7).
-
Use the gradient formula with the coordinates in the same order:
m=−7−54−(−2).m=\frac{-7-5}{4-(-2)}.m=4−(−2)−7−5. -
Simplify the changes in the coordinates:
m=−126=−2.m=\frac{-12}{6}=-2.m=6−12=−2. -
The gradient is negative, so the line should fall from left to right. This agrees with the coordinates: as xxx increases from −2-2−2 to 4, yyy decreases from 5 to −7-7−7.
Mixing the coordinate order
If you calculate y2−y1y_2-y_1y2−y1 in the numerator, you must calculate x2−x1x_2-x_1x2−x1 in the denominator. Reversing only one subtraction changes the sign incorrectly.
Vertical lines
For a vertical line, x2−x1=0x_2-x_1=0x2−x1=0, so the gradient formula would require division by zero. Its gradient is therefore undefined, and its equation has the form x=kx=kx=k, where kkk is a constant.
The form y=mx+cy=mx+cy=mx+c
Gradient-intercept form
The equation
y=mx+cy=mx+cy=mx+cis called the gradient-intercept form. Here, mmm is the gradient and ccc is the yyy-intercept, the value of yyy where the line crosses the yyy-axis.
At the yyy-axis, x=0x=0x=0, so substituting into y=mx+cy=mx+cy=mx+c gives y=cy=cy=c. This explains why the point (0,c)(0,c)(0,c) lies on the line.
Finding an equation from a gradient and a point
Find the equation of the line with gradient 3 that passes through (2,−1)(2,-1)(2,−1).
-
Begin with y=mx+cy=mx+cy=mx+c and substitute the known gradient:
y=3x+c.y=3x+c.y=3x+c. -
The point (2,−1)(2,-1)(2,−1) lies on the line, so substitute x=2x=2x=2 and y=−1y=-1y=−1:
−1=3(2)+c.-1=3(2)+c.−1=3(2)+c. -
Solve for the intercept:
c=−7.c=-7.c=−7.Therefore, the equation is
y=3x−7.y=3x-7.y=3x−7.
Checking a line equation
Substitute the coordinates of the given point into your final equation. If both sides are equal, the point lies on the line.
The point-gradient form
If you know a gradient and one point, you can avoid finding the intercept first.
Point-gradient form
A line with gradient mmm passing through (x1,y1)(x_1,y_1)(x1,y1) has equation
y−y1=m(x−x1).y-y_1=m(x-x_1).y−y1=m(x−x1).This is the point-gradient form of a straight-line equation.
The formula follows directly from the definition of gradient:
m=y−y1x−x1⇒y−y1=m(x−x1).m=\frac{y-y_1}{x-x_1} \quad\Rightarrow\quad y-y_1=m(x-x_1).m=x−x1y−y1⇒y−y1=m(x−x1).Finding an equation from two points
Find the equation of the line through (3,8)(3,8)(3,8) and (−1,−4)(-1,-4)(−1,−4).
-
Calculate the gradient:
m=8−(−4)3−(−1)=124=3.m=\frac{8-(-4)}{3-(-1)}=\frac{12}{4}=3.m=3−(−1)8−(−4)=412=3. -
Use either point in the point-gradient form. Using (3,8)(3,8)(3,8) gives
y−8=3(x−3).y-8=3(x-3).y−8=3(x−3). -
Expand and rearrange if required:
y−8=3x−9y=3x−1.\begin{aligned} y-8&=3x-9\\ y&=3x-1. \end{aligned}y−8y=3x−9=3x−1.
A gradient and one point determine a line
Once you know the direction of a non-vertical line and one point on it, its position is fixed. This is why a gradient and a point are enough to form its equation.
The general form
General form
A straight-line equation can be written in the general form
ax+by+c=0,ax+by+c=0,ax+by+c=0,where aaa, bbb and ccc are constants, and aaa and bbb are not both zero.
This form includes vertical lines, which cannot be written as y=mx+cy=mx+cy=mx+c. If b≠0b\neq0b=0, rearranging gives
y=−abx−cb,y=-\frac{a}{b}x-\frac{c}{b},y=−bax−bc,so the gradient is
m=−ab.m=-\frac{a}{b}.m=−ba.Rearranging a line into general form
Write y=−23x+5y=-\frac{2}{3}x+5y=−32x+5 in the form ax+by+c=0ax+by+c=0ax+by+c=0 using integer coefficients.
-
Multiply every term by 3 to remove the fraction:
3y=−2x+15.3y=-2x+15.3y=−2x+15. -
Move all terms to one side:
2x+3y−15=0.2x+3y-15=0.2x+3y−15=0. -
The coefficients are integers with no common factor, so this is a suitable final form.
Parallel lines
Parallel lines
Two distinct lines are parallel if they always remain the same distance apart and never meet.
Non-vertical parallel lines have equal gradients. If their gradients are m1m_1m1 and m2m_2m2, then
m1=m2.m_1=m_2.m1=m2.Vertical lines are also parallel to one another.
Finding a parallel line
Find the equation of the line parallel to 2x−5y+4=02x-5y+4=02x−5y+4=0 and passing through (3,1)(3,1)(3,1).
-
Rearrange the given line to identify its gradient:
−5y=−2x−4y=25x+45.\begin{aligned} -5y&=-2x-4\\ y&=\frac{2}{5}x+\frac{4}{5}. \end{aligned}−5yy=−2x−4=52x+54.Its gradient is 25\frac{2}{5}52.
-
A parallel line has the same gradient, so use the point-gradient form:
y−1=25(x−3).y-1=\frac{2}{5}(x-3).y−1=52(x−3). -
Multiply by 5 and rearrange:
5y−5=2x−62x−5y−1=0.\begin{aligned} 5y-5&=2x-6\\ 2x-5y-1&=0. \end{aligned}5y−52x−5y−1=2x−6=0.
Perpendicular lines
Perpendicular lines
Two lines are perpendicular if they meet at a right angle.
For two non-vertical lines with gradients m1m_1m1 and m2m_2m2, the perpendicular-gradient condition is
m1m2=−1.m_1m_2=-1.m1m2=−1.Therefore, if one gradient is mmm, the perpendicular gradient is −1m-\frac{1}{m}−m1. This is sometimes described as taking the negative reciprocal.
Finding a perpendicular line
Find the equation of the line perpendicular to y=4x+7y=4x+7y=4x+7 and passing through (8,2)(8,2)(8,2).
-
The given line has gradient 4, so the perpendicular gradient is
−14.-\frac{1}{4}.−41. -
Apply the point-gradient form using (8,2)(8,2)(8,2):
y−2=−14(x−8).y-2=-\frac{1}{4}(x-8).y−2=−41(x−8). -
Simplify:
y−2=−14x+2y=−14x.\begin{aligned} y-2&=-\frac{1}{4}x+2\\ y&=-\frac{1}{4}x. \end{aligned}y−2y=−41x+2=−41x.
Changing only the sign
The perpendicular gradient to 4 is not −4-4−4. You must change the sign and take the reciprocal, giving −14-\frac{1}{4}−41.
Straight-line models
A mathematical model uses mathematics to represent a real situation. A straight-line model has the form
y=mx+c.y=mx+c.y=mx+c.In context, mmm represents the rate at which one quantity changes with another, while ccc represents the predicted value of yyy when x=0x=0x=0.
Modelling a taxi fare
A taxi company charges a fixed booking fee plus a constant amount per mile. A 4-mile journey costs £11, while a 10-mile journey costs £23. Form a model for the cost CCC pounds of a journey of ddd miles.
-
Treat the data as the points (4,11)(4,11)(4,11) and (10,23)(10,23)(10,23). The rate per mile is the gradient:
m=23−1110−4=126=2.m=\frac{23-11}{10-4}=\frac{12}{6}=2.m=10−423−11=612=2. -
Write C=2d+cC=2d+cC=2d+c and use (4,11)(4,11)(4,11) to find the fixed fee:
11=2(4)+c⇒c=3.11=2(4)+c \quad\Rightarrow\quad c=3.11=2(4)+c⇒c=3. -
The model is
C=2d+3.C=2d+3.C=2d+3.The gradient represents a charge of £2 per mile, and the intercept represents a £3 booking fee.
In the exam
- Identify what information you have: two points, or a point and a gradient.
- Calculate gradients with a consistent coordinate order and keep fractions exact.
- Use equal gradients for parallel lines and m1m2=−1m_1m_2=-1m1m2=−1 for perpendicular lines.
- Rearrange into the form requested and verify that the given point satisfies your equation.
- In a model, explain the gradient and intercept using the quantities and units in the question.
Check yourself
- Can you find the equation of the line through (−2,7)(-2,7)(−2,7) and (4,−5)(4,-5)(4,−5)?
- What is the gradient of a line perpendicular to 3x+2y−8=03x+2y-8=03x+2y−8=0?
- In a model C=1.5t+20C=1.5t+20C=1.5t+20, what could the gradient and intercept represent?