How steep is a line?

Think of a road climb­ing up a ghat. How steep it is can be cap­tured by one num­ber, its slope. Com­pare the slopes of two lines and you can tell at once whether they are par­al­lel or per­pen­dic­u­lar. We will quickly revise the dis­tance and sec­tion for­mu­las, define slope and incli­na­tion, use slopes to check whether points lie on one line, and find the angle between two lines.

A quick recap

You already know these from ear­lier classes. Dis­tance: PQ=(x2−x1)2+(y2−y1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}. The point divid­ing PQPQ inter­nally in the ratio m:nm : n: (mx2+nx1m+n,my2+ny1m+n)\displaystyle \left(\tfrac{mx_2 + nx_1}{m + n}, \tfrac{my_2 + ny_1}{m + n}\right). And the area of a tri­an­gle: 12∣x1(y2−y3)+x2(y3−y1)+x3(y1−y2)∣\displaystyle \tfrac{1}{2}\lvert x_1(y_2 - y_3) + x_2(y_3 - y_1) + x_3(y_1 - y_2) \rvert.

Slope

The incli­na­tion θ\theta of a line is the angle it makes with the pos­i­tive xx-axis, 0≤θ<π0 \le \theta < \pi. Its slope is sim­ply m=tan⁡θm = \tan\theta (θ≠π2\displaystyle \theta \ne \tfrac{\pi}{2}). If you know two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) on it, with x1≠x2x_1 \ne x_2, the slope is rise over run:

A rising line making angle theta with the positive x-axis, through points (x1, y1) and (x2, y2); the run x2 - x1 and the rise y2 - y1 are drawn dashed, and m = tan theta = rise over run.
Slope is rise over run, and equals the tan­gent of the incli­na­tion

m=y2−y1x2−x1.\displaystyle m = \frac{y_2 - y_1}{x_2 - x_1}.

A hor­i­zon­tal line has slope 00, while a ver­ti­cal line has no slope at all. As you read from left to right, a line with pos­i­tive slope climbs and one with neg­a­tive slope goes down­hill.

Par­al­lel and per­pen­dic­u­lar. Two non-ver­ti­cal lines are par­al­lel exactly when m1=m2m_1 = m_2, and they are per­pen­dic­u­lar exactly when m1m2=−1m_1 m_2 = -1.

Collinear­ity. AA, BB, CC lie on one line exactly when slope ABAB = slope BCBC.

Exam­ple 1. The slope of the line through (2,−3)(2, -3) and (−4,9)(-4, 9) is 12−6=−2\displaystyle \tfrac{12}{-6} = -2.

Exam­ple 2. Are (1,5)(1, 5), (3,11)(3, 11), (−2,−4)(-2, -4) collinear? The two slopes are 62=3\displaystyle \tfrac{6}{2} = 3 and 155=3\displaystyle \tfrac{15}{5} = 3, the same, so yes.

The points (-2, -4), (1, 5) and (3, 11) plotted on a grid; a single dashed line of slope 3 passes through all three, showing they are collinear.
Exam­ple 2: the three points lie on one line of slope 3

Exam­ple 3. A line through (3,k)(3, k) and (5,7)(5, 7) is per­pen­dic­u­lar to one of slope 12\displaystyle \tfrac{1}{2}, so its own slope must be the neg­a­tive rec­i­p­ro­cal: 7−k2=−2\displaystyle \tfrac{7 - k}{2} = -2, k=11k = 11.

Angle between two lines

If θ\theta is the acute angle between lines of slopes m1m_1 and m2m_2 (1+m1m2≠01 + m_1m_2 \ne 0),

tan⁡θ=∣m2−m11+m1m2∣.\displaystyle \tan\theta = \left\lvert \frac{m_2 - m_1}{1 + m_1 m_2} \right\rvert.

This comes straight from θ=θ2−θ1\theta = \theta_2 - \theta_1 and the tan⁡\tan sub­trac­tion for­mula you learnt in trigonom­e­try.

Exam­ple 4. Take slopes 22 and −3-3. Then tan⁡θ=∣−51−6∣=1\displaystyle \tan\theta = \left\lvert \tfrac{-5}{1 - 6} \right\rvert = 1, θ=45∘\theta = 45^\circ.

Two lines through the origin, one of slope 2 and one of slope -3; the acute angle between them is marked as 45 degrees.
Exam­ple 4: lines of slopes 2 and -3 meet at 45 degrees

Exam­ple 5. A line makes 45∘45^\circ with a line of slope 13\displaystyle \tfrac{1}{3}. To find its slope, solv­ing ∣m−1/31+m/3∣=1\displaystyle \left\lvert \tfrac{m - 1/3}{1 + m/3} \right\rvert = 1 gives m=2m = 2 or m=−12\displaystyle m = -\tfrac{1}{2}.

Try these your­self

  1. Find the slope of the line through (4,−1)(4, -1) and (−2,5)(-2, 5) and its incli­na­tion.
  2. Find the slope of a line with incli­na­tion 150∘150^\circ; of the line bisect­ing the first quad­rant.
  3. Show that (−3,7)(-3, 7), (1,1)(1, 1) and (5,−5)(5, -5) are collinear.
  4. Find xx if the slope of the line through (x,3)(x, 3) and (2,−1)(2, -1) is 45\displaystyle \tfrac{4}{5}.
  5. Show that (2,1)(2, 1), (6,3)(6, 3), (4,7)(4, 7) form a right-angled tri­an­gle, using slopes.
  6. Find the acute angle between lines of slopes 12\displaystyle \tfrac{1}{2} and 33.
  7. The line through (−1,3)(-1, 3) and (5,5)(5, 5) is per­pen­dic­u­lar to the line through (6,10)(6, 10) and (x,22)(x, 22). Find xx.
  8. Find the area of the tri­an­gle with ver­tices (1,2)(1, 2), (6,5)(6, 5), (3,9)(3, 9).
  9. A line has slope mm and makes angle 60∘60^\circ with the line y=3xy = \sqrt{3}x. Find mm.
  10. Using slopes, show that (1,1)(1, 1), (5,2)(5, 2), (6,6)(6, 6), (2,5)(2, 5) form a par­al­lel­o­gram, and in fact a rhom­bus.

Answers to check against

Show answers
  1. −1-1; 135∘135^\circ.
  2. −13\displaystyle -\tfrac{1}{\sqrt{3}}; 11.
  3. Both slopes come out as −32\displaystyle -\tfrac{3}{2} and −32\displaystyle -\tfrac{3}{2}.
  4. −1−32−x=45\displaystyle \tfrac{-1 - 3}{2 - x} = \tfrac{4}{5} gives 2−x=−52 - x = -5, x=7x = 7.
  5. Slopes 12\displaystyle \tfrac{1}{2} (ABAB) and −2-2 (BCBC): prod­uct −1-1, right angle at BB.
  6. tan⁡θ=3−1/21+3/2=1\displaystyle \tan\theta = \tfrac{3 - 1/2}{1 + 3/2} = 1: 45∘45^\circ.
  7. First slope 13\displaystyle \tfrac{1}{3}; sec­ond 12x−6=−3\displaystyle \tfrac{12}{x - 6} = -3: x=2x = 2.
  8. 12∣1(5−9)+6(9−2)+3(2−5)∣=12∣−4+42−9∣=14.5\displaystyle \tfrac{1}{2}\lvert 1(5 - 9) + 6(9 - 2) + 3(2 - 5) \rvert = \tfrac{1}{2}\lvert -4 + 42 - 9 \rvert = 14.5.
  9. 00 or −3-\sqrt{3} (incli­na­tions 0∘0^\circ or 120∘120^\circ).
  10. Oppo­site sides have slopes 14\displaystyle \tfrac{1}{4} and 44 in pairs; all sides 17\sqrt{17}.