Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 2.1 · SL and HL

Straight lines

A straight line is the simplest relationship there is, so how do you pin one down, write it in whichever form the question wants, and tell when two lines are parallel or meet at a right angle?

What you will learn

  • Understand gradient as rise over run, and what its sign and size say about a line.
  • Know the gradient-intercept, point-gradient and general forms of a line and when to use each.
  • Know that parallel lines share a gradient and perpendicular gradients multiply to −1.
  • Understand the gradient of a road or ramp, and of a linear model, as a rate of change.

You must be able to

  1. Find the equation of a line through two points, or through a point with a given gradient.
  2. Find the equation of a line parallel or perpendicular to a given line through a given point.
  3. Write a line in the form ax + by + d = 0 with integer coefficients, and read its gradient.
  4. Calculate the intercepts of a line and sketch it.
  5. Solve two linear equations to find where two lines meet.
  6. Calculate the gradient of an incline as a decimal, a percentage or an angle, and interpret a gradient in context.

In the exam. Paper 1 Section A, as a short 4 to 6 mark question: find a gradient, write an equation in a given form, find where two lines meet. Paper 2, in a context such as a slope, a ramp or a linear cost model. And inside longer questions: tangents and normals in calculus are built with the point-gradient form and the perpendicular rule.

1Gradient: rise over run

The gradient of a line measures how steep it is and which way it slopes.

Take any two points on it, (x1,y1)(x_{1}, y_{1}) and (x2,y2)(x_{2}, y_{2}).

  • The run is the horizontal change x2−x1x_{2} - x_{1}.
  • The rise is the vertical change y2−y1y_{2} - y_{1}.

The gradient is

m=y2−y1x2−x1m = \dfrac{y_{2} - y_{1}}{x_{2} - x_{1}} · rise over run, from the formula booklet.

Figure 1 draws it for A(−2,5)A(-2, 5) and B(4,−1)B(4, -1).

Figure 1 · Gradient is rise over run x y −4 −2 2 6 −2 2 4 6 run = 4 − (−2) = 6 rise = −1 − 5 = −6 A(−2, 5) B(4, −1) y = −x + 3 From A to B the line runs 6 to the right and falls 6, so m = −6 ÷ 6 = −1.
Figure 1 · Gradient is rise over run
m=y2−y1x2−x1=−1−54−(−2)B is point 2, A is point 1=−66=−1\begin{aligned}m &= \frac{y_{2} - y_{1}}{x_{2} - x_{1}} \\[6pt] &= \frac{-1 - 5}{4 - (-2)} && \textcolor{#838c91}{\text{B is point 2, A is point 1}} \\[6pt] &= \frac{-6}{6} \\[6pt] &= -1\end{aligned}

Two things make this reliable.

  • Subtract in the same order. Use B minus A on top and bottom, or A minus B on both. Swapping the order in one place only gives +1+1, which is wrong.
  • Any two points will do. A straight line has the same gradient everywhere. That is what makes it straight.

Direction and special lines

  • Reading from left to right, a line with m>0m > 0 rises and a line with m<0m < 0 falls (Figure 2).
  • A horizontal line has m=0m = 0. The rise is zero whatever the run.
  • A vertical line has no gradient (the gradient is undefined). The run is zero and you cannot divide by zero.
  • Example: points (1,−3)(1, -3) and (5,−3)(5, -3) give rise 00, so m=0m = 0. The line is y=−3y = -3.
  • Example: points (−4,1)(-4, 1) and (−4,7)(-4, 7) give run 00, so the gradient is undefined. The line is x=−4x = -4.
  • The constant coordinate gives the equation. Vertical lines are x=kx = k and horizontal lines are y=ky = k. Do not swap them.
Figure 2 · What the sign of the gradient tells you m > 0 · rises x y m < 0 · falls x y m = 0 · horizontal x y undefined · vertical x y Read left to right. Up is positive, down is negative, flat is zero, and a vertical line has no gradient.
Figure 2 · What the sign of the gradient tells you

Size. A gradient of 5 is steep, −0.5-0.5 is gentle and falling; 3 and −3-3 are equally steep.

From a picture

  • You are often given a graph. Pick two points the line passes through exactly, such as grid corners or marked intercepts. Use them in the formula.
  • Example: a line through (0,6)(0, 6) and (2,0)(2, 0) has gradient 0−62−0=−3\dfrac{0 - 6}{2 - 0} = -3. It falls, as the picture would show.
  • Check your answer against the sign you can see.

2Writing the equation: three forms of one line

The three forms are equivalent: each describes exactly the same set of points, but each is good for something different.

FormWrittenWhat it shows at a glanceUse it when
Gradient-intercepty=mx+cy = mx + cgradient mm, yy-intercept (0,c)(0, c)you need to read off the gradient or sketch the line
Point-gradienty−y1=m(x−x1)y - y_{1} = m(x - x_{1})gradient mm and one point (x1,y1)(x_{1}, y_{1}) on the lineyou know a point and a gradient: the fastest way to write the equation
Generalax+by+d=0ax + by + d = 0nothing directly, but it has no fractionsthe question asks for it, usually with a,b,da, b, d integers

Gradient-intercept form

  • When mm and cc are given, just write them in.
  • Example: a line with gradient 14\frac{1}{4} cutting the yy-axis at (0,−5)(0, -5) is y=14x−5y = \frac{1}{4}x - 5. Going the other way, y=−3x+8y = -3x + 8 has gradient −3-3 and yy-intercept (0,8)(0, 8).
  • Solve for yy before you read off mm. In 2y=6x−42y = 6x - 4 the gradient is 3, not 6.

Point-gradient form

  • Substitute the gradient and a point. There is no cc to hunt for.
  • Example: one line through all three forms passes through (6,1)(6, 1) with gradient −23-\frac{2}{3}.
y−1=−23(x−6)point-gradient: substitute m and (x1,y1) directlyy - 1 = -\frac{2}{3}(x - 6) \qquad \textcolor{#838c91}{\text{point-gradient: substitute }m\text{ and }(x_{1}, y_{1})\text{ directly}}y−1=−23x+4expand: −23×(−6)=+4y - 1 = -\frac{2}{3}x + 4 \qquad \textcolor{#838c91}{\text{expand: }-\frac{2}{3} \times (-6) = +4}y=−23x+5gradient-intercept: m=−23, c=5y = -\frac{2}{3}x + 5 \qquad \textcolor{#838c91}{\text{gradient-intercept: }m = -\frac{2}{3}\text{, }c = 5}3y=−2x+15multiply by 3 to clear the fraction3y = -2x + 15 \qquad \textcolor{#838c91}{\text{multiply by 3 to clear the fraction}}2x+3y−15=0general form, a=2, b=3, d=−152x + 3y - 15 = 0 \qquad \textcolor{#838c91}{\text{general form, }a = 2\text{, }b = 3\text{, }d = -15}

Check with the known point: 2(6)+3(1)−15=12+3−15=02(6) + 3(1) - 15 = 12 + 3 - 15 = 0. It lies on the line, so the equation is right. It catches most sign slips.

Figure 3 draws the line with all three forms beside it.

Figure 3 · One line, three ways to write it x y 2 4 6 2 4 6 (0, 5) (7.5, 0) (6, 1) point-gradient y − 1 = −⅔(x − 6) gradient-intercept y = −⅔x + 5 general 2x + 3y − 15 = 0 Every form describes the same set of points. Each one puts a different fact on show.
Figure 3 · One line, three ways to write it

General form with integers

  • When a question says a,b,d∈Za, b, d \in \mathbb{Z}, clear every fraction, then move all terms to one side.
  • Example: from y=56x−2y = \frac{5}{6}x - 2, multiply by 6 to get 6y=5x−126y = 5x - 12. So 5x−6y−12=05x - 6y - 12 = 0.
  • Any non-zero integer multiple is the same line, so −5x+6y+12=0-5x + 6y + 12 = 0 is equally right.

Going back from general form

  • Rearrange for yy. From ax+by+d=0ax + by + d = 0 you get y=−abx−dby = -\frac{a}{b}x - \frac{d}{b}, so the gradient is −ab-\frac{a}{b}.
  • Example: take 3x−4y+12=03x - 4y + 12 = 0. Then 4y=3x+124y = 3x + 12, so y=34x+3y = \frac{3}{4}x + 3. The gradient is 34\frac{3}{4} and the yy-intercept is (0,3)(0, 3).
  • Show the rearrangement rather than quoting −ab-\frac{a}{b}. It catches sign slips.

A line through two points. Find the gradient first, then use either point in the point-gradient form. For U(1,6)U(1, 6) and V(4,−2)V(4, -2):

m=−2−64−1=−83m = \frac{-2 - 6}{4 - 1} = -\frac{8}{3}y−6=−83(x−1)use Uy - 6 = -\frac{8}{3}(x - 1) \qquad \textcolor{#838c91}{\text{use U}}3y−18=−8(x−1)multiply by 33y - 18 = -8(x - 1) \qquad \textcolor{#838c91}{\text{multiply by 3}}3y−18=−8x+83y - 18 = -8x + 88x+3y−26=0check with V: 32−6−26=08x + 3y - 26 = 0 \qquad \textcolor{#838c91}{\text{check with V: }32 - 6 - 26 = 0}

Starting from V gives the same line: y+2=−83(x−4)y + 2 = -\frac{8}{3}(x - 4). Either point works, so check with the other.

Is a point on the line?

  • A point lies on a line exactly when its coordinates make the equation true.
  • Example: test (−3,5)(-3, 5) on 7x+2y−9=07x + 2y - 9 = 0. The left side is −21+10−9=−20-21 + 10 - 9 = -20, not 0. So the point is not on the line.
  • The same substitution finds an unknown constant. If (k,−2)(k, -2) is on 4x+3y−10=04x + 3y - 10 = 0, then 4k−6−10=04k - 6 - 10 = 0. So 4k=164k = 16 and k=4k = 4.

Special lines

  • Only the general form can write a vertical line: x+5=0x + 5 = 0 has b=0b = 0.
  • A line through the origin has no constant term: y=mxy = mx, or ax+by=0ax + by = 0.

3Intercepts and sketching

An intercept is where a line crosses an axis, and it is a point, so write it as coordinates.

  • The yy-intercept is where x=0x = 0. Put x=0x = 0 into the equation.
  • The xx-intercept is where y=0y = 0. Put y=0y = 0 into the equation.

For 2x+3y−15=02x + 3y - 15 = 0 (Figure 3):

  • With x=0x = 0, 3y=153y = 15 so y=5y = 5. The yy-intercept is (0,5)(0, 5).
  • With y=0y = 0, 2x=152x = 15 so x=7.5x = 7.5. The xx-intercept is (7.5,0)(7.5, 0).

For 5x−4y−20=05x - 4y - 20 = 0, the yy-intercept has −4y=20-4y = 20, so it is (0,−5)(0, -5). The xx-intercept has 5x=205x = 20, so it is (4,0)(4, 0).

In y=mx+cy = mx + c the yy-intercept can be read straight off as (0,c)(0, c). No other form hands you an intercept for free.

A horizontal line y=4y = 4 has yy-intercept (0,4)(0, 4) and no xx-intercept, since it never reaches the xx-axis. A vertical line x=−3x = -3 has xx-intercept (−3,0)(-3, 0) and no yy-intercept.

Sketching a line. Two points fix a line, so find two easy ones and join them. There are two routes.

  • From the gradient and intercept. Rearrange to y=mx+cy = mx + c and plot (0,c)(0, c). Then move 1 to the right and mm up (down if mm is negative) to find a second point.
    • Example: for y=−13x+2y = -\frac{1}{3}x + 2, plot (0,2)(0, 2), then go right 3 and down 1 to reach (3,1)(3, 1).
    • When mm is a fraction, run by the denominator and rise by the numerator to land on grid points.
  • From the intercepts. Plot both axis crossings and join them. Here they are (0,−5)(0, -5) and (4,0)(4, 0) for 5x−4y−20=05x - 4y - 20 = 0.
    • This needs no rearranging. It fails when the line passes through the origin, because the two intercepts are then the same point.
    • Example: for y=−2xy = -2x, plot the origin and then any second point, such as (1,−2)(1, -2).

Use a ruler, label the axes, and write the intercept coordinates on the sketch. A sketch shows key features, not exact scale.

4Parallel and perpendicular lines

Two lines with gradients m1m_{1} and m2m_{2} are:

Parallel when m1=m2m_{1} = m_{2}. Perpendicular when m1×m2=−1m_{1} \times m_{2} = -1, so m2=−1m1m_{2} = -\dfrac{1}{m_{1}}, the negative reciprocal.

Parallel lines rise at the same rate, so with different intercepts they never meet.

The perpendicular rule needs a picture, and Figure 4 gives it.

Take a triangle with run 4 and rise 3, so m1=34m_{1} = \frac{3}{4}. Turn the whole triangle a quarter turn about the origin.

  • The run of 4 becomes a rise of 4.
  • The rise of 3 becomes a run of −3-3, pointing left.

The new gradient is 4−3=−43\frac{4}{-3} = -\frac{4}{3}. The numbers have swapped places (the reciprocal) and one sign has flipped (the negative). Multiply them: 34×(−43)=−1\frac{3}{4} \times \left(-\frac{4}{3}\right) = -1.

That works for any gradient. Turning through 90∘90^{\circ} always swaps run and rise and flips one sign.

Figure 4 · Turn a gradient triangle through 90° x y run 4 rise 3 m₁ = 3/4 run −3 rise 4 m₂ = 4/(−3) = −4/3 90° Rotating a quarter turn swaps run and rise and flips one sign: 3/4 becomes −4/3. m₁ × m₂ = (3/4) × (−4/3) = −1.
Figure 4 · Turn a gradient triangle through 90°

The rule has one exception you must know. A horizontal line (m=0m = 0) and a vertical line (no gradient) are perpendicular. But you cannot multiply an undefined gradient by anything. Treat that pair by eye: y=−2y = -2 and x=5x = 5 meet at a right angle.

Showing a right angle. "Show that triangle PQR has a right angle at Q" is a perpendicular-gradient question. With P(0,1)P(0, 1), Q(6,4)Q(6, 4), R(4,8)R(4, 8):

mPQ=4−16−0=12m_{PQ} = \frac{4 - 1}{6 - 0} = \frac{1}{2}mQR=8−44−6=−2m_{QR} = \frac{8 - 4}{4 - 6} = -2mPQ×mQR=−1so PQ is perpendicular to QR, and the angle at Q is 90∘m_{PQ} \times m_{QR} = -1 \qquad \textcolor{#838c91}{\text{so PQ is perpendicular to QR, and the angle at Q is }90^{\circ}}

End with a sentence: the product alone is not the conclusion.

Both rules on one line. Start from L: 3x−4y+12=03x - 4y + 12 = 0, whose gradient is 34\frac{3}{4} (section 2). Take the point (2,−1)(2, -1). Figure 5 draws the results.

Parallel to L through (2,−1)(2, -1)

  • Same gradient, 34\frac{3}{4}.
  • A quick route in general form: a parallel line has the same aa and bb. So it is 3x−4y+d=03x - 4y + d = 0 for some dd.
  • Substitute the point: 3(2)−4(−1)+d=03(2) - 4(-1) + d = 0, so 6+4+d=06 + 4 + d = 0 and d=−10d = -10. The line is 3x−4y−10=03x - 4y - 10 = 0.

Perpendicular to L through (2,−1)(2, -1). Gradient −43-\frac{4}{3}.

m2=−134=−43negative reciprocalm_{2} = \frac{-1}{\frac{3}{4}} = -\frac{4}{3} \qquad \textcolor{#838c91}{\text{negative reciprocal}}y−(−1)=−43(x−2)y - (-1) = -\frac{4}{3}(x - 2)3(y+1)=−4(x−2)multiply by 33(y + 1) = -4(x - 2) \qquad \textcolor{#838c91}{\text{multiply by 3}}3y+3=−4x+83y + 3 = -4x + 84x+3y−5=0check: 4(2)+3(−1)−5=04x + 3y - 5 = 0 \qquad \textcolor{#838c91}{\text{check: }4(2) + 3(-1) - 5 = 0}
Figure 5 · Parallel and perpendicular to the same line x y −2 2 4 −4 −2 2 4 3x − 4y + 12 = 0 (2, −1) 3x − 4y − 10 = 0 x y −2 2 4 −4 −2 4 3x − 4y + 12 = 0 (2, −1) 4x + 3y − 5 = 0 Parallel keeps the gradient ¾. Perpendicular turns it into its negative reciprocal, −4/3.
Figure 5 · Parallel and perpendicular to the same line

In general form, the perpendicular line swapped aa and bb and changed one sign: 3x−4y3x - 4y became 4x+3y4x + 3y. That is the negative reciprocal in disguise, and it makes a quick check.

5The perpendicular bisector

Perpendicular bisector of a segment AB = the line through its midpoint at right angles to it.

Every point on it is the same distance from A as from B. It turns up in questions about the point equidistant from two towns or two masts.

There are three steps:

  1. Find the midpoint.
  2. Find the gradient of AB.
  3. Take the negative reciprocal.

Figure 6 draws it for A(−1,2)A(-1, 2) and B(5,6)B(5, 6).

M=(−1+52,2+62)=(2,4)midpointM = \left(\frac{-1 + 5}{2}, \frac{2 + 6}{2}\right) = (2, 4) \qquad \textcolor{#838c91}{\text{midpoint}}mAB=6−25−(−1)=46=23m_{AB} = \frac{6 - 2}{5 - (-1)} = \frac{4}{6} = \frac{2}{3}m⊥=−32negative reciprocalm_{\perp} = -\frac{3}{2} \qquad \textcolor{#838c91}{\text{negative reciprocal}}y−4=−32(x−2)y - 4 = -\frac{3}{2}(x - 2)2y−8=−3x+62y - 8 = -3x + 63x+2y−14=0check M: 6+8−14=03x + 2y - 14 = 0 \qquad \textcolor{#838c91}{\text{check M: }6 + 8 - 14 = 0}
Figure 6 · The perpendicular bisector of AB x y 2 4 6 2 4 6 8 A(−1, 2) B(5, 6) M(2, 4) 3x + 2y − 14 = 0 It passes through the midpoint M and meets AB at a right angle. Every point on it is the same distance from A as from B.
Figure 6 · The perpendicular bisector of AB

6Where two lines meet

Two lines that are not parallel meet at exactly one point. That point satisfies both equations at once. So solve the two equations simultaneously.

Example: to find where x+2y=−1x + 2y = -1 and 3x−y=113x - y = 11 meet, make yy the subject of the second and substitute into the first.

y=3x−11from the second equationy = 3x - 11 \qquad \textcolor{#838c91}{\text{from the second equation}}x+2(3x−11)=−1x + 2(3x - 11) = -17x−22=−17x - 22 = -17x=21, so x=37x = 21, \ \text{so}\ x = 3y=3(3)−11=−2intersection (3,−2)y = 3(3) - 11 = -2 \qquad \textcolor{#838c91}{\text{intersection }(3, -2)}check in line 1: 3+2(−2)=−1 ✓\text{check in line 1: } 3 + 2(-2) = -1 \ \checkmark
  • On Paper 1 you do this by hand. The numbers will be kind.
  • On Paper 2 you may use your GDC. Use the simultaneous solver, or graph both lines and use the intersect tool, as 2.4 does for curves.
    • Example: for y=1.6x−3.4y = 1.6x - 3.4 and 2x+3y−5=02x + 3y - 5 = 0, rearrange the second to y=5−2x3y = \frac{5 - 2x}{3} if needed. Graph both. The intersection reads (2.24,0.176)(2.24, 0.176) to 3 s.f. Give the answer as a point.
  • If two lines have the same gradient and different intercepts, they never meet. The equations have no solution.
    • Example: y=2x+1y = 2x + 1 and 4x−2y+7=04x - 2y + 7 = 0 both have gradient 2, but the second has yy-intercept 3.53.5.
  • If they have the same gradient and the same intercept, they are the same line. Every point is a solution.
    • Example: 6x−3y=96x - 3y = 9 and y=2x−3y = 2x - 3 are one line written twice.

7Gradient in the real world: slopes, rates and models

The guide asks you to calculate gradients of inclines. A road, a ramp or a bridge has a gradient in exactly the sense above. Take care with one point: the run is the horizontal distance, not the distance along the slope.

Example: a mountain road climbs 84 m while covering a horizontal distance of 1.2 km. Put both in metres first.

m=riserun=8412001.2 km=1200 m, same units top and bottom=0.07=7%a gradient as a percentage is m×100\begin{aligned}m &= \frac{\text{rise}}{\text{run}} = \frac{84}{1200} && \textcolor{#838c91}{1.2\ \mathrm{km} = 1200\ \mathrm{m}\text{, same units top and bottom}} \\[6pt] &= 0.07 \\[6pt] &= 7\% && \textcolor{#838c91}{\text{a gradient as a percentage is }m \times 100}\end{aligned}

Figure 7 shows that triangle. A road sign reading 7% means exactly this: 7 m up for every 100 m across.

Figure 7 · A mountain road as a gradient horizontal distance 1.2 km = 1200 m rise 84 m road θ m = 84 ÷ 1200 = 0.07, a 7% gradient, and tan θ = 0.07 so θ ≈ 4.00° Gradient = vertical rise ÷ horizontal distance. Vertical scale stretched so the rise can be seen.
Figure 7 · A mountain road as a gradient
  • Angle of inclination θ\theta = the angle the slope makes with the horizontal.
  • The gradient is its tangent, because tan⁡θ=oppositeadjacent=riserun\tan\theta = \dfrac{\text{opposite}}{\text{adjacent}} = \dfrac{\text{rise}}{\text{run}}. So tan⁡θ=0.07\tan\theta = 0.07 and θ=arctan⁡0.07≈4.00∘\theta = \arctan 0.07 \approx 4.00^{\circ}.

When the length along the slope is given

  • A footbridge ramp is 26 m long and climbs 3 m. The 26 m is the hypotenuse.
  • Find the horizontal run first by Pythagoras: 262−32=667≈25.83 m\sqrt{26^{2} - 3^{2}} = \sqrt{667} \approx 25.83\ \mathrm{m}. Then m=3÷25.83≈0.116m = 3 \div 25.83 \approx 0.116, which is 11.6%. And θ=arctan⁡3667≈6.63∘\theta = \arctan\dfrac{3}{\sqrt{667}} \approx 6.63^{\circ} (use the unrounded gradient).

Gradient as a rate of change

  • In a model the gradient is a rate: the output change per one-unit change in the input.
  • Example: a hot-air balloon descends steadily. Its height in metres after tt minutes is h=900−45th = 900 - 45t.
    • The gradient −45-45 says the height falls 45 m for every extra minute.
    • The intercept 900 is the height when t=0t = 0, the starting height.
    • The balloon lands when h=0h = 0: 45t=90045t = 900, so t=20t = 20 minutes.
  • When a question says interpret the gradient, the answer has one shape. For each extra one unit of xx, yy increases (or decreases) by mm units. Name the real units. Interpreting the intercept is the same idea: "the value of yy when x=0x = 0".

Is a table linear?

  • Data are linear when the gradient between every pair of neighbouring rows is the same.
  • Example: take x=2,5,6,10x = 2, 5, 6, 10 with y=1,10,13,25y = 1, 10, 13, 25. The xx-steps are unequal, so divide each change in yy by its change in xx: 93=3\frac{9}{3} = 3, 31=3\frac{3}{1} = 3, 124=3\frac{12}{4} = 3.
  • The gradient is constant, so the data are linear. With the point (2,1)(2, 1) the model is y=3x−5y = 3x - 5. One differing gradient and the data are not linear.

Practice questions

49 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.