Find the gradient of a line, write its equation in three forms, use gradients for parallel and perpendicular lines, find intersections and perpendicular bisectors, and build linear models.
IB Mathematics: Analysis and Approaches
Part of 2 Functions
SL and HL
Key terms introduced here
Each is in the Maths AA glossary, with every other term in the subject.
The point where a graph crosses the y-axis, found by putting x=0. In y=mx+c it is (0,c); the value c itself is also called the y-intercept.
for parallel lines and
m1×m2=−1
for perpendicular lines.
Determine the point of intersection of two lines.
Find the equation of the perpendicular bisector of a line segment.
Construct and interpret a linear model from a context.
A straight line is the simplest graph of a relationship between two variables: one that changes at a constant rate. Lines model situations such as a taxi fare that rises by a fixed amount per kilometre or the conversion between temperature scales, and they reappear throughout calculus as tangents and normals to curves. Almost every topic in the course uses the equation of a line somewhere, so fluency with it saves time everywhere else.
Every non-vertical line is completely described by two numbers: how steep it is and where it crosses the y-axis. Working with lines mostly means finding those two numbers from different kinds of information and then using them.
Gradient
The steepness of a line is measured by its gradient (also called the slope). Moving between any two points on the line, the vertical change (the rise) divided by the horizontal change (the run) always gives the same number.
The gradient is the rise divided by the run. Any two points on the line give the same value.
The value does not depend on which two points are chosen. Any two rise–run triangles drawn on the same line have the same angles, so they are similar, and the ratio of their vertical side to their horizontal side is the same. This is exactly what makes a line straight: its gradient is constant everywhere along it.
The sign and size of the gradient
The sign of the gradient shows the direction of the line, read from left to right. Its size shows how steep the line is: a gradient of 5 is steeper than a gradient of 21, and a gradient of −5 is steeper than a gradient of −21.
Gradient
Direction from left to right
Example
m>0
Rises (y increases as x increases)
y=2x+1
m<0
Falls (y decreases as x increases)
y=−3x+4
m=0
Horizontal
y=5
Undefined
Vertical (the run is zero)
x=−2
A vertical line has no defined gradient because every pair of points on it has x2−x1=0, and division by zero is undefined. It is wrong to say its gradient is "infinity" or zero.
Reading a gradient from a graph
To find the gradient from a graph, choose two points where the line passes exactly through grid intersections, so that their coordinates can be read without estimating. Then count (or subtract) the rise and the run, taking care with the scales on the two axes, which are often different.
L
Line L passes exactly through three grid points. Any two of them give the gradient.
Gradient as a rate of change
When the axes stand for real quantities, the gradient has units: units of y per unit of x. If y is a distance in kilometres and x a time in hours, the gradient is a speed in kilometres per hour. A constant gradient means a constant rate of change, which is the defining feature of a linear relationship. The idea is extended to curves in calculus (5.1), where the gradient changes from point to point.
Forms of the equation of a line
A point (x,y) lies on a line exactly when its coordinates satisfy the line's equation. Three forms of the equation appear regularly. Each is convenient for a different purpose, and any one can be rearranged into the others.
Form
Equation
Most useful when
Gradient–intercept
y=mx+c
The gradient and the y-intercept are needed or given
General
ax+by+d=0
Writing a final answer with integer coefficients
Point–gradient
y−y1=m(x−x1)
A point on the line and the gradient are known
Gradient–intercept form
In y=mx+c, the coefficient m is the gradient and the constant c is the y-intercept, the value of y where the line crosses the y-axis.
The form follows directly from the gradient formula. A line with gradient m passes through (0,c). For any other point (x,y) on it,
x−0y−c=m⇒y−c=mx⇒y=mx+c
y = 2x + 1
y = 2x − 3
y = −½x + 1
Changing c moves a line up or down without changing its direction. Changing m turns the line about its y-intercept.
Point–gradient form
Often the y-intercept is not known, but the gradient m and one point (x1,y1) on the line are. If (x,y) is any other point on the line, the gradient between it and (x1,y1) must equal m:
x−x1y−y1=m⇒y−y1=m(x−x1)
This is the point–gradient form. It is the quickest route from "a point and a gradient" to an equation, and it is the form used for tangents and normals in calculus (5.4).
When two points are given instead of a point and a gradient, find the gradient first and then use either point in the point–gradient form. Both points give the same line.
General form
The general form ax+by+d=0 puts every term on one side. It is the standard way to present a final answer because the coefficients can always be made integers, and it is the only one of the three forms that can describe every line, vertical lines included.
To find the gradient and y-intercept from the general form (with b=0), make y the subject:
by=−ax−d⇒y=−bax−bd
so the gradient is −ba and the y-intercept is −bd. Rearranging each time is safer than memorising these results.
The same line has many general-form equations: 3x+2y−5=0 and 6x+4y−10=0 describe the same points. It is usual to divide out any common factor and to make a positive.
Intercepts with the axes
The x-intercept is where the line crosses the x-axis. Every point on the x-axis has y=0, and every point on the y-axis has x=0, which gives a simple method for both intercepts.
Plotting the two intercepts is also the fastest way to draw a line given in general form: find where it meets each axis and join the two points.
Horizontal and vertical lines
A horizontal line has gradient 0, so y=mx+c becomes y=c: every point on it has the same y-coordinate. A vertical line has an undefined gradient and cannot be written as y=mx+c at all. Every point on it has the same x-coordinate, so its equation is x=k for a constant k.
y = 2
The horizontal line y = 2 and the vertical line x = −3 meet at right angles at (−3, 2).
In general form, a horizontal line has a=0 (for example y−2=0) and a vertical line has b=0 (for example x+3=0). A horizontal line and a vertical line are always perpendicular to each other.
Parallel and perpendicular lines
Parallel lines
Parallel lines run in the same direction and never meet. Two lines run in the same direction exactly when they have the same rise for the same run, which means the same gradient.
For lines in general form, parallel lines have the same ratio a:b. So every line parallel to 2x+5y−7=0 can be written 2x+5y+d=0 for some constant d, which gives a shortcut.
Perpendicular lines
Two lines are perpendicular when they meet at a right angle. Their gradients are linked by a simple rule.
The gradient −m11 is called the negative reciprocal of m1: turn the fraction upside down and change its sign. The rule comes from turning a rise–run triangle through a right angle.
Turning the rise–run triangle through 90° swaps the rise and the run and reverses one direction, so b/a becomes −a/b.
Suppose the first line rises b units for a run of a units to the right, so m1=ab. Rotating the whole picture through 90° anticlockwise turns the run of a to the right into a rise of a, and the rise of b into a run of b to the left. The rotated line is perpendicular to the first, and its gradient is
m2=−ba=−ba,som1×m2=ab×(−ba)=−1
m1
Perpendicular gradient m2=−m11
Check m1m2
2
−21
−1
−43
34
−1
51
−5
−1
−1
1
−1
For a "show that" question, every step must be visible and the final sentence must state the conclusion; stopping at −1 without saying what it proves leaves the argument unfinished.
Intersection of two lines
The point where two lines cross lies on both of them, so its coordinates satisfy both equations at once. Finding it means solving the two equations simultaneously, by substitution or by elimination. With a graphic display calculator (GDC), the intersection can be found from the graphs or with the simultaneous-equation solver.
Two lines in the plane meet in exactly one point, in no point or in infinitely many points.
Gradients
y-intercepts
Number of intersection points
Different, m1=m2
Any
Exactly one
Equal, m1=m2
Different
None (parallel lines)
Equal, m1=m2
Equal
Infinitely many (the same line)
y = 2x − 1
3x + 2y = 12
The intersection (2, 3) is the only point whose coordinates satisfy both equations.
When both equations are in general form, elimination is usually quicker. For 2x+3y=7 and 5x−3y=14, adding the equations removes y and gives 7x=21, so x=3 and then 3y=7−6, giving y=31. The intersection is (3,31).
The perpendicular bisector of a line segment
The perpendicular bisector of a line segment AB cuts it into two equal halves and meets it at right angles. Its key property is that every point on it is equidistant from A and B, which is why it is used to find the centre of a circle through given points.
The bisector passes through the midpoint at a right angle, and any point P on it is equally far from A and B.
The method uses the midpoint formula (covered in 3.1), M=(2x1+x2,2y1+y2), together with the perpendicular gradient rule.
Find the midpoint M of AB.
Find the gradient of AB, then the negative reciprocal.
Use the point–gradient form with M and the perpendicular gradient.
The perpendicular bisectors of the sides of a triangle all meet at one point, which is equidistant from all three vertices. That point is the centre of the circle through the three vertices.
Lines as linear models
Many real relationships change at a constant rate, at least approximately and over a limited range. A linear model describes such a relationship with a straight line.
Interpreting a model means stating what m and c mean in the context, with units. In a taxi fare C=1.6d+4, in euros for a journey of d kilometres, the gradient 1.6 is the cost per kilometre (€1.60 per km) and the intercept 4 is the fixed charge (€4) paid before the taxi moves. A model is only valid for sensible inputs: here d≥0, and the line is drawn only for those values.
C = 1.6d + 4
The model starts at the fixed charge of €4 and rises €1.60 for every kilometre. It is drawn only for d ≥ 0.
When a context gives two pairs of values instead of a rate and a starting value, treat them as two points on the line. The temperature scales are a standard example: water freezes at 0°C, which is 32°F, and boils (at sea level) at 100°C, which is 212°F.
The gradient and the intercept carry the meaning of a linear model, which is a clear case of the course's key concept of modelling: two numbers summarise a whole relationship. The same idea returns in statistics (4.4), where a regression line is a linear model fitted to data that do not lie exactly on a line.
Comparing two linear models
Two linear models can be compared by finding where their lines intersect: on one side of the intersection one model gives the larger value, and on the other side the other does.
Straight lines in calculus
The equation of a line returns in calculus. The tangent to a curve at a point is the line through that point whose gradient equals the gradient of the curve there, and the normal is the line through the same point perpendicular to the tangent. Both are found with the point–gradient form and the rule m1×m2=−1 (5.4).
Exam-style questions on straight lines
A typical calculator-allowed question sets a linear model in a real context and asks for interpretation as well as calculation.
Self-check
To do:
I can find the gradient of a line from two points, from a graph or from its equation, and state what its sign means.
To do:
I can convert between y=mx+c, ax+by+d=0 and y−y1=m(x−x1), giving integer coefficients when asked.
To do:
I can find the x- and y-intercepts of a line and the area of the triangle it makes with the axes.
To do:
I can write the equations of horizontal and vertical lines and explain why a vertical line has no gradient.
To do:
I can decide whether two lines are parallel, perpendicular or neither, including when a parameter is involved.
To do:
I can find the point of intersection of two lines by substitution or elimination.
To do:
I can find the equation of the perpendicular bisector of a segment and use it to find a point equidistant from others.
To do:
I can build a linear model from a context and interpret its gradient and intercept with units.
.
[2]2 marks
Markscheme (a)
m=tan150°(M1)
y=−31x(=−33x)A1
(b)(i)
The line L meets the unit circle, x2+y2=1, at the points A and B, where A is in the second quadrant.
Write down the coordinates of A.
[1]1 mark
Markscheme (b)(i)
A(−23,21)A1
(b)(ii)
Write down the coordinates of B.
[1]1 mark
Markscheme (b)(ii)
B(23,−21)A1
(c)
The line M passes through O and is perpendicular to L. The line M meets the unit circle at the point C, which lies in the first quadrant.
Find the area of triangle ABC.
[3]3 marks
Markscheme (c)
C corresponds to the angle 60°, so C(21,23)(A1)
EITHER
recognition that [AB] is a diameter of length 2 and [OC] is perpendicular to [AB] with OC=1(M1)
area =21×2×1
OR
recognition that angle ACB =90° with AC=BC=2
area =21×2×2
THEN
=1A1
Question 2 · AA-0014715 marks
Consider the function f(x)=x(4−x), for 0≤x≤4.
The line L passes through the origin O and makes an angle of 50° with the positive x-axis. The line L meets the graph of f at O and at the point P.
(a)
Write down the equation of L.
[1]1 mark
(b)
Find the x-coordinate of P.
[3]3 marks
(c)
Find the area of the region enclosed by L and the graph of f.
Multiply every term by 2 to clear the fraction, then collect all terms on one side.
2y−8=−3x−3⇒3x+2y−5=0
Check with Q(3,−2): 3(3)+2(−2)−5=9−4−5=0. ✓
so L meets the x-axis at (−4,0).
On the y-axis x=0:
−4y+12=0⇒y=3
so L meets the y-axis at (0,3).
(b) The triangle has a right angle at the origin, a base of length 4 along the x-axis and a height of 3 along the y-axis. Lengths are positive, even though the intercept −4 is negative.
Area=21×4×3=6
3x − 4y + 12 = 0
The line and the two axes enclose a right-angled triangle with legs 4 and 3.
, so the gradient is
−52
. The parallel line has the same gradient and passes through
(4,−1)
:
y+1=−52(x−4)
Multiply by 5:
5y+5=−2x+8⇒2x+5y−3=0
Method 2. A parallel line has the form 2x+5y+d=0. Substitute (4,−1):
2(4)+5(−1)+d=0⇒d=−3
Both methods give 2x+5y−3=0.
Multiply by 2 and rearrange:
2y−2=−x+6⇒x+2y−8=0
Check: 6+2(1)−8=0, and the gradient of x+2y−8=0 is −21, with 2×(−21)=−1. ✓
Gradients.
mAB=4−(−2)5−1=64=32
so the perpendicular gradient is −23.
Equation.
y−3=−23(x−1)
Multiply by 2:
2y−6=−3x+3⇒3x+2y−9=0
Check: M(1,3) gives 3+6−9=0. ✓ The point (3,0) also lies on the bisector, and its distances to A and B are 52+12=26 and 12+52=26, equal as expected.
is
y=0
.
(b) The centre is equidistant from A, B and C, so it lies on both perpendicular bisectors. Substitute y=0 into 3x+2y−9=0:
3x−9=0⇒x=3
The centre is (3,0). The radius is its distance from A:
r=(3−(−2))2+(0−1)2=25+1=26≈5.10
Check with C: (4−3)2+(−5−0)2=26. ✓
The intercept is 32, so
F=1.8C+32
(b) Each rise of 1°C corresponds to a rise of 1.8°F.
(c) Put F=C:
C=1.8C+32⇒−0.8C=32⇒C=−40
Both scales read −40 at the same temperature.
. Plan A is cheaper, by $6. Plan B's line is steeper, so it is cheaper only below 300 minutes.
(b) The midpoint of AB is
M=(2−1+5,22+4)=(2,3)
The perpendicular gradient is −3, since 31×(−3)=−1. Using M:
y−3=−3(x−2)⇒y=−3x+9⇒3x+y−9=0
(c) L has gradient 31 and y-intercept −6, so L is y=31x−6. Substitute into 3x+y−9=0:
3x+31x−6−9=0⇒310x=15⇒x=29
Then y=31×29−6=23−6=−29, so D=(29,−29).
(d) The perpendicular bisector is perpendicular to AB, and L is parallel to AB, so the bisector meets L at right angles at D. The shortest distance from M to L is therefore MD.
MD=(29−2)2+(−29−3)2=425+4225=4250=2510
The word "hence" means the answer to (c) must be used, so the reason that MD is perpendicular to L must be stated.
(a) Parallel lines have equal gradients:
−2k=−k+13⇒k(k+1)=6⇒k2+k−6=0
(k+3)(k−2)=0⇒k=−3 or k=2
Check that the lines are not identical. For k=2: 2x+2y−3=0 and 3x+3y+5=0, which are x+y=1.5 and x+y=−35, distinct. For k=−3: −3x+2y−3=0 and 3x−2y+5=0, which are 3x−2y=−3 and 3x−2y=−5, distinct. Both values give parallel lines.
(b) Perpendicular lines satisfy m1m2=−1:
(−2k)(−k+13)=−1⇒2(k+1)3k=−1
3k=−2k−2⇒k=−52
Check: m1=51 and m2=−0.63=−5, and 51×(−5)=−1. ✓
(b) The temperature falls by 6.5°C for each kilometre gained in height.
(c) Solve 15−6.5h=0:
h=6.515=2.307…≈2.31 km
(d) At h=11: T=15−6.5×11=15−71.5=−56.5°C.
(M1)
y = f(x)
L
Find the acute angle between the tangent to the graph of
f
at O and the
x
-axis.
[3]3 marks
(e)
The line y=xtanθ, where θ is acute, divides the region enclosed by the graph of f and the x-axis into two parts of equal area.
Find the value of θ.
[5]5 marks
.
[4]4 marks
.
Use this fact to show that tan(125π)=2+3.
[3]3 marks
meet the line
x=2
at the points C and D respectively.
Find the exact area of triangle OCD, where O is the origin.