Straight Lines • Topic 1 of 3

Slope of a Line and Angle Between Two Lines

The slope (or gradient) of a line measures how steeply it rises or falls. If a line passes through two distinct points $(x_1, y_1)$ and $(x_2, y_2)$ with $x_1 \ne x_2$, its slope is the ratio of the change in $y$ (the "rise") to the change in $x$ (the "run"):

$$m=\dfrac{y_2-y_1}{x_2-x_1}$$

This single number captures everything about a line's direction. A positive slope means the line climbs left-to-right; a negative slope means it falls. A horizontal line has slope $0$ (no rise), while a vertical line has $x_1 = x_2$, so the denominator vanishes and the slope is undefined — not infinite, simply not a real number. A crucial fact: the value of $m$ is the same whichever two points of the line you choose, and it does not matter which point you label "first" as long as you are consistent in numerator and denominator.

Slope as an angle of inclination. If a line makes an angle $\theta$ measured anticlockwise from the positive $x$-axis, with $0^\circ \le \theta < 180^\circ$, then the slope is the tangent of that inclination:

$$m=\tan\theta$$

So a line inclined at $45^\circ$ has slope $\tan 45^\circ = 1$, and one at $135^\circ$ has slope $\tan 135^\circ = -1$. An acute inclination ($0^\circ < \theta < 90^\circ$) gives a positive slope; an obtuse inclination ($90^\circ < \theta < 180^\circ$) gives a negative slope. Because $\tan 90^\circ$ is undefined, this is consistent with a vertical line having no slope.

Parallel and perpendicular lines. Two non-vertical lines with slopes $m_1$ and $m_2$ satisfy clean conditions you will use constantly:

RelationshipCondition on slopesGeometric meaning
Parallel$m_1 = m_2$same inclination, never meet
Perpendicular$m_1 \cdot m_2 = -1$cross at $90^\circ$
Coincident$m_1 = m_2$ and share a pointidentical line
Same inclination$m_1 = m_2 = \tan\theta$equal angle $\theta$ with $x$-axis

The perpendicular rule $m_1 m_2 = -1$ is equivalent to saying each slope is the negative reciprocal of the other: $m_2 = -\dfrac{1}{m_1}$. So a line of slope $\dfrac{3}{4}$ is perpendicular to any line of slope $-\dfrac{4}{3}$.

Angle between two lines. The acute angle $\theta$ between two non-vertical, non-perpendicular lines of slopes $m_1$ and $m_2$ is given by:

$$\tan\theta=\left|\dfrac{m_2-m_1}{1+m_1 m_2}\right|$$

Taking the absolute value guarantees you get the acute angle; dropping the modulus gives one of the two supplementary angles the lines actually form, and the obtuse angle is then $180^\circ - \theta$. Notice that if $1 + m_1 m_2 = 0$ the expression blows up — which is exactly the perpendicular case, where the angle is $90^\circ$. If instead $m_1 = m_2$ the numerator is zero, $\tan\theta = 0$, and the lines are parallel ($\theta = 0^\circ$).

Collinearity of three points. Three points $A$, $B$, $C$ lie on a single straight line precisely when the slope does not change as you move along them. So $A(x_1,y_1)$, $B(x_2,y_2)$, $C(x_3,y_3)$ are collinear if:

$$\text{slope of } AB = \text{slope of } BC \quad\Longleftrightarrow\quad \dfrac{y_2-y_1}{x_2-x_1}=\dfrac{y_3-y_2}{x_3-x_2}$$

This is the slope test for collinearity. (An equivalent test is that the area of triangle $ABC$ is zero, which you may meet later.) The same idea answers "find $k$ so that three points are collinear": equate the two slopes and solve.

Deeper Insight — why slope is the DNA of a line: Slope is the one invariant that survives no matter which two points on the line you pick, and that permanence is what makes it so powerful. Choose any pair of points on the same line and the ratio $\tfrac{y_2-y_1}{x_2-x_1}$ comes out identical — this is the geometric face of the algebraic fact that a straight line has a constant rate of change. That constancy is precisely why $m = \tan\theta$ works: a fixed direction means a fixed inclination angle. The parallel and perpendicular conditions are not arbitrary rules to memorise but direct consequences — equal slopes force equal inclinations, and $m_1 m_2 = -1$ is what you get when two inclinations differ by exactly $90^\circ$. Even the collinearity test is the same idea in disguise: three points lie on one line exactly when the "direction" between them never changes. When you reach calculus this same slope reappears as the derivative — the slope of the tangent line is the instantaneous rate of change — so mastering slope now pays dividends far beyond coordinate geometry.

Slope as rise over run with inclination angle theta Slope = rise ÷ run = tanθ run = x₂−x₁ rise = y₂−y₁ (x₁, y₁)(x₂, y₂) θ Parallel lines have equal slopes and perpendicular lines have product of slopes minus one Parallel vs Perpendicular PARALLEL: m₁ = m₂same direction PERPENDICULAR: m₁·m₂ = −1cross at 90°
1
Worked Example
Find the slope of the line passing through $(2, 3)$ and $(5, 9)$.
Solution
  1. Apply the slope formula with $(x_1, y_1) = (2, 3)$ and $(x_2, y_2) = (5, 9)$.
  2. $m = \dfrac{y_2 - y_1}{x_2 - x_1} = \dfrac{9 - 3}{5 - 2} = \dfrac{6}{3}$.
  3. Simplify: $m = 2$.

Answer: $m = 2$ (the line rises $2$ units for every $1$ unit right).

2
Worked Example
A line makes an angle of $120^\circ$ with the positive direction of the $x$-axis. Find its slope.
Solution
  1. Slope equals the tangent of the inclination: $m = \tan\theta = \tan 120^\circ$.
  2. $\tan 120^\circ = \tan(180^\circ - 60^\circ) = -\tan 60^\circ$.
  3. Since $\tan 60^\circ = \sqrt{3}$, we get $m = -\sqrt{3}$.

Answer: $m = -\sqrt{3}$.

3
Worked Example
Show that the line through $(1, 2)$ and $(4, 8)$ is parallel to the line through $(0, -1)$ and $(2, 3)$.
Solution
  1. Slope of the first line: $m_1 = \dfrac{8 - 2}{4 - 1} = \dfrac{6}{3} = 2$.
  2. Slope of the second line: $m_2 = \dfrac{3 - (-1)}{2 - 0} = \dfrac{4}{2} = 2$.
  3. Since $m_1 = m_2 = 2$, the lines have equal slopes.

Answer: The lines are parallel ($m_1 = m_2 = 2$).

4
Worked Example
Find the value of $k$ so that the line through $(3, k)$ and $(2, 7)$ is perpendicular to a line of slope $-\dfrac{1}{2}$.
Solution
  1. For perpendicularity, the slope of our line must be the negative reciprocal of $-\dfrac{1}{2}$, namely $2$.
  2. Slope through $(3, k)$ and $(2, 7)$: $m = \dfrac{7 - k}{2 - 3} = \dfrac{7 - k}{-1} = k - 7$.
  3. Set $k - 7 = 2$, so $k = 9$.

Answer: $k = 9$.

5
Worked Example
Find the acute angle between the lines with slopes $m_1 = 1$ and $m_2 = \dfrac{1}{2}$.
Solution
  1. Use $\tan\theta = \left|\dfrac{m_2 - m_1}{1 + m_1 m_2}\right|$.
  2. Substitute: $\tan\theta = \left|\dfrac{\tfrac{1}{2} - 1}{1 + (1)(\tfrac{1}{2})}\right| = \left|\dfrac{-\tfrac{1}{2}}{\tfrac{3}{2}}\right| = \dfrac{1}{3}$.
  3. Therefore $\theta = \tan^{-1}\dfrac{1}{3} \approx 18.43^\circ$.

Answer: $\theta = \tan^{-1}\dfrac{1}{3} \approx 18.43^\circ$.

6
Worked Example
Without finding the angle, decide whether the lines through $(0, 0),(2, 4)$ and through $(1, 5),(3, 4)$ are perpendicular.
Solution
  1. Slope of the first line: $m_1 = \dfrac{4 - 0}{2 - 0} = 2$.
  2. Slope of the second line: $m_2 = \dfrac{4 - 5}{3 - 1} = \dfrac{-1}{2}$.
  3. Product of slopes: $m_1 m_2 = 2 \times \left(-\dfrac{1}{2}\right) = -1$.

Answer: Yes — since $m_1 m_2 = -1$, the lines are perpendicular.

7
Worked Example
Show that the points $A(1, 2)$, $B(3, 6)$ and $C(5, 10)$ are collinear.
Solution
  1. Slope of $AB$: $\dfrac{6 - 2}{3 - 1} = \dfrac{4}{2} = 2$.
  2. Slope of $BC$: $\dfrac{10 - 6}{5 - 3} = \dfrac{4}{2} = 2$.
  3. The two slopes are equal and the segments share point $B$.

Answer: Since slope $AB =$ slope $BC = 2$, the points $A$, $B$, $C$ are collinear.

8
Worked Example
Find $k$ so that the points $A(2, 3)$, $B(4, k)$ and $C(6, -3)$ are collinear.
Solution
  1. For collinearity, slope of $AB =$ slope of $BC$.
  2. $\dfrac{k - 3}{4 - 2} = \dfrac{-3 - k}{6 - 4} \Rightarrow \dfrac{k - 3}{2} = \dfrac{-3 - k}{2}$.
  3. So $k - 3 = -3 - k \Rightarrow 2k = 0 \Rightarrow k = 0$.

Answer: $k = 0$.

9
Worked Example
The angle between two lines is $45^\circ$. If the slope of one line is $\dfrac{1}{2}$, find the slope of the other.
Solution
  1. Let the unknown slope be $m$. Use $\tan 45^\circ = \left|\dfrac{m - \tfrac{1}{2}}{1 + \tfrac{1}{2}m}\right| = 1$.
  2. Case 1: $\dfrac{m - \tfrac{1}{2}}{1 + \tfrac{1}{2}m} = 1 \Rightarrow m - \tfrac{1}{2} = 1 + \tfrac{1}{2}m \Rightarrow \tfrac{1}{2}m = \tfrac{3}{2} \Rightarrow m = 3$.
  3. Case 2: $\dfrac{m - \tfrac{1}{2}}{1 + \tfrac{1}{2}m} = -1 \Rightarrow m - \tfrac{1}{2} = -1 - \tfrac{1}{2}m \Rightarrow \tfrac{3}{2}m = -\tfrac{1}{2} \Rightarrow m = -\dfrac{1}{3}$.

Answer: The other line has slope $m = 3$ or $m = -\dfrac{1}{3}$.

10
Worked Example
Find the slope of a line which makes an angle of $30^\circ$ with the positive $y$-axis, measured anticlockwise.
Solution
  1. The $y$-axis is itself inclined at $90^\circ$ to the $x$-axis.
  2. Measuring $30^\circ$ anticlockwise from the $y$-axis gives an inclination $\theta = 90^\circ + 30^\circ = 120^\circ$ to the $x$-axis.
  3. $m = \tan 120^\circ = -\tan 60^\circ = -\sqrt{3}$.

Answer: $m = -\sqrt{3}$.

11
Worked Example
Using slopes, show that the points $A(-2, -1)$, $B(4, 0)$, $C(3, 3)$ and $D(-3, 2)$ are the vertices of a parallelogram.
Solution
  1. Slope of $AB = \dfrac{0 - (-1)}{4 - (-2)} = \dfrac{1}{6}$; slope of $DC = \dfrac{3 - 2}{3 - (-3)} = \dfrac{1}{6}$. So $AB \parallel DC$.
  2. Slope of $BC = \dfrac{3 - 0}{3 - 4} = -3$; slope of $AD = \dfrac{2 - (-1)}{-3 - (-2)} = \dfrac{3}{-1} = -3$. So $BC \parallel AD$.
  3. Both pairs of opposite sides are parallel.

Answer: Opposite sides are parallel, so $ABCD$ is a parallelogram.

12
Worked Example
Find the angle between the lines $y = \sqrt{3}\,x + 1$ and $y = \dfrac{1}{\sqrt{3}}\,x - 2$.
Solution
  1. Read off the slopes: $m_1 = \sqrt{3}$, $m_2 = \dfrac{1}{\sqrt{3}}$.
  2. $\tan\theta = \left|\dfrac{m_2 - m_1}{1 + m_1 m_2}\right| = \left|\dfrac{\tfrac{1}{\sqrt{3}} - \sqrt{3}}{1 + \sqrt{3}\cdot\tfrac{1}{\sqrt{3}}}\right| = \left|\dfrac{\tfrac{1 - 3}{\sqrt{3}}}{2}\right| = \left|\dfrac{-2}{2\sqrt{3}}\right| = \dfrac{1}{\sqrt{3}}$.
  3. So $\theta = \tan^{-1}\dfrac{1}{\sqrt{3}} = 30^\circ$.

Answer: The acute angle between the lines is $30^\circ$.

Key Points

  • Slope $m = \dfrac{y_2 - y_1}{x_2 - x_1}$ is constant for any two points on the line; it is undefined for a vertical line.
  • Slope equals the tangent of the inclination: $m = \tan\theta$, with $0^\circ \le \theta < 180^\circ$ (acute $\theta \Rightarrow m > 0$, obtuse $\theta \Rightarrow m < 0$).
  • Parallel lines have equal slopes; perpendicular lines satisfy $m_1 m_2 = -1$ (negative reciprocals).
  • Acute angle between lines: $\tan\theta = \left|\dfrac{m_2 - m_1}{1 + m_1 m_2}\right|$; the obtuse angle is $180^\circ - \theta$.
  • A vanishing denominator $1 + m_1 m_2 = 0$ signals the perpendicular case ($\theta = 90^\circ$); equal slopes give $\theta = 0^\circ$.
  • Three points are collinear when the slope between successive pairs is equal: slope $AB =$ slope $BC$.
Tap an option to check your answer0 / 4
Q1.The slope of the line through $(x_1,y_1)$ and $(x_2,y_2)$ is:
Explanation: Slope $=\tfrac{\Delta y}{\Delta x}$.
Q2.The slope of $y=2x+3$ is:
Explanation: Coefficient of $x$ in slope-intercept form.
Q3.Two parallel lines have slopes that are:
Explanation: Parallel $\Rightarrow$ equal slopes.
Q4.Two perpendicular lines satisfy:
Explanation: Product of slopes $=-1$.