Slope and angle between lines

Two straight lines crossing on a page make an angle — but you never need a protractor to find it. The slope of a line is a single number that captures its steepness and tilt, and once you know the slopes of two lines, plain algebra hands you the angle between them, including the special cases where the lines never meet (parallel) or meet at a perfect right angle (perpendicular). This is the first genuinely new idea in the ISC Class 11 Coordinate Geometry unit, arriving right after the recall of distance, section and area formulas from ICSE Class 10. Slope is the load-bearing concept for everything that follows: every form of a line's equation is built from it, and later topics such as distance from a line and angle bisectors lean on it directly. Master the sign conventions here and the rest of straight-line geometry becomes bookkeeping.

The core insight

The slope m=tan⁡θm=\tan\theta of a line fixes its direction, and comparing two slopes through tan⁡θ=∣m1−m21+m1m2∣\tan\theta=\left|\dfrac{m_1-m_2}{1+m_1m_2}\right| gives the angle between the lines, with m1=m2m_1=m_2 signalling parallel lines and m1m2=−1m_1m_2=-1 signalling perpendicular lines.

The core idea

Slope from two points. A line is tilted the same way everywhere, so any two of its points give the same ratio of rise to run. For a line through (x1,y1)(x_1,y_1) and (x2,y2)(x_2,y_2) with x1≠x2x_1 \ne x_2,

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

where: mm is the slope (a pure number, no units), and (x1,y1)(x_1,y_1), (x2,y2)(x_2,y_2) are any two distinct points on the line, subtracted in matching order.

Slope as inclination. Every non-vertical line makes a definite angle θ\theta with the positive xx-axis, measured anticlockwise, 0°≤θ<180°0° \le \theta < 180°. The slope is simply m=tan⁡θm=\tan\theta. A horizontal line has θ=0°\theta=0°, so m=0m=0; a vertical line has θ=90°\theta=90°, where tangent is undefined, so vertical lines have no defined slope — they are the one case slope cannot describe.

Reading the sign. A positive slope means the line climbs as you move right (acute inclination); a negative slope means it falls (obtuse inclination); zero slope means flat. This sign picture is exactly why the angle-between-lines formula below needs an absolute value — two lines of opposite-sign slope meet at both an acute and an obtuse angle, and we always want the acute one first.

Angle between two lines. For two lines with slopes m1m_1 and m2m_2 (neither vertical), the acute angle θ\theta between them satisfies

tan⁡θ=∣m1−m21+m1m2∣\tan\theta = \left| \frac{m_1 - m_2}{1 + m_1 m_2} \right|

where: m1,m2m_1, m_2 are the two slopes and the modulus guarantees θ\theta lands in [0°,90°)[0°,90°), the acute angle; the obtuse angle between the same pair of lines is 180°−θ180°-\theta.

Parallel and perpendicular conditions. Two non-vertical lines are parallel exactly when m1=m2m_1=m_2 (two vertical lines are also parallel to each other, despite having no slope). Two non-vertical, non-horizontal lines are perpendicular exactly when

m1m2=−1m_1 m_2 = -1

equivalently m2=−1/m1m_2=-1/m_1, each slope the negative reciprocal of the other. A horizontal and a vertical line are perpendicular by direct inspection, not by this formula, since the vertical one has no slope to plug in.

Figure
Two lines crossing at a point with their inclination angles marked against the horizontal axis and the acute angle between them labelled
Slope fixes tilt; comparing two slopes gives the angle between lines x theta1 angle line 1, m1 line 2, m2 acute angle between the lines depends only on m1 and m2
Derivation AThe angle between two lines from their slopes

The goal is to derive the tangent-of-angle-between-lines formula, tan⁡θ=∣m1−m21+m1m2∣\tan\theta=\left|\dfrac{m_1-m_2}{1+m_1m_2}\right|, starting only from the definition m=tan⁡θm=\tan\theta for a single line's inclination and the standard tangent-subtraction identity from trigonometry, so that a student can see the absolute value is a deliberate choice, not a decoration.

Step 1. Let the two lines have inclination angles θ1\theta_1 and θ2\theta_2 with the positive xx-axis, so their slopes are m1=tan⁡θ1m_1=\tan\theta_1 and m2=tan⁡θ2m_2=\tan\theta_2. The angle between the lines, measured from line 2 to line 1, is θ=θ1−θ2\theta=\theta_1-\theta_2.

Step 2. Apply the tangent-subtraction identity: tan⁡(θ1−θ2)=tan⁡θ1−tan⁡θ21+tan⁡θ1tan⁡θ2\tan(\theta_1-\theta_2)=\dfrac{\tan\theta_1-\tan\theta_2}{1+\tan\theta_1\tan\theta_2}. Substituting the slopes for the tangents gives tan⁡θ=m1−m21+m1m2\tan\theta=\dfrac{m_1-m_2}{1+m_1m_2}.

Step 3. This raw expression can come out negative — for instance if θ1−θ2\theta_1-\theta_2 is obtuse, its tangent is negative even though the lines also make a perfectly good acute angle on the other side. Since a pair of lines actually makes two angles that add to 180°180° (one acute, one obtuse), and only the acute one is the conventional "angle between the lines," take the absolute value to force the answer into [0°,90°)[0°,90°): tan⁡θ=∣m1−m21+m1m2∣\tan\theta=\left|\dfrac{m_1-m_2}{1+m_1m_2}\right|.

Step 4. Check the special cases fall out correctly. If m1=m2m_1=m_2, the numerator is zero, so tan⁡θ=0\tan\theta=0 and θ=0°\theta=0° — the lines are parallel, as expected. If m1m2=−1m_1m_2=-1, the denominator is zero, so tan⁡θ\tan\theta is undefined, meaning θ=90°\theta=90° — the lines are perpendicular. Both boundary conditions confirm the formula behaves exactly as the geometry demands.

Worked example

Find the angle between the lines with slopes m1=3m_1=3 and m2=−2m_2=-2, and then find the equation of the line through (2,1)(2,1) that is perpendicular to the line of slope m1=3m_1=3.

Step 1. Substitute into the angle formula: tan⁡θ=∣3−(−2)1+(3)(−2)∣=∣51−6∣=∣5−5∣=1\tan\theta=\left|\dfrac{3-(-2)}{1+(3)(-2)}\right|=\left|\dfrac{5}{1-6}\right|=\left|\dfrac{5}{-5}\right|=1.

Step 2. Solve for the angle: θ=tan⁡−1(1)=45°\theta=\tan^{-1}(1)=45°. This is the acute angle between the two lines; the obtuse angle between the same pair is 180°−45°=135°180°-45°=135°.

Step 3. For the perpendicular line, its required slope m3m_3 must satisfy m1m3=−1m_1 m_3=-1 with m1=3m_1=3, so m3=−13m_3=-\dfrac{1}{3}.

Step 4. Apply point-slope form through (2,1)(2,1) with slope −13-\dfrac13: y−1=−13(x−2)y-1=-\dfrac13(x-2), which simplifies to 3y−3=−x+23y-3=-x+2, or x+3y−5=0x+3y-5=0.

The acute angle between the two given lines is 45°\boxed{45°}, and the perpendicular line through (2,1)(2,1) is x+3y−5=0x+3y-5=0.

Competitive stretch

A line ℓ\ell passes through A(1,2)A(1,2) and B(4,8)B(4,8), and a second line mm passes through C(−2,−1)C(-2,-1) and D(0,3)D(0,3). Show ℓ\ell is parallel to mm, then find a point EE with xx-coordinate 77 so that segment AEAE is perpendicular to ℓ\ell.

Step 1. Slope of ℓ=AB\ell=AB: m1=8−24−1=63=2m_1=\dfrac{8-2}{4-1}=\dfrac{6}{3}=2. Slope of m=CDm=CD: m2=3−(−1)0−(−2)=42=2m_2=\dfrac{3-(-1)}{0-(-2)}=\dfrac{4}{2}=2. Since m1=m2=2m_1=m_2=2, the two lines are parallel, and since they clearly pass through different points, they are distinct parallel lines, not the same line.

Step 2. The line AEAE must be perpendicular to ℓ\ell, whose slope is 22, so the required slope m3m_3 satisfies 2m3=−12m_3=-1, giving m3=−12m_3=-\dfrac12.

Step 3. Apply point-slope form through A(1,2)A(1,2) with slope −12-\dfrac12: y−2=−12(x−1)y-2=-\dfrac12(x-1). At x=7x=7: y−2=−12(6)=−3y-2=-\dfrac12(6)=-3, so y=−1y=-1.

ℓ\ell and mm are parallel (both slope 22), and E=(7,−1)E=(7,-1) makes AEAE perpendicular to ℓ\ell.

Common traps

  • Dividing coordinates in the wrong order. Slope must be y2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1} with both differences taken in the same point order — swapping one but not the other flips the sign.
  • Dropping the absolute value in the angle formula. Without it, tan⁡θ\tan\theta can come out negative, which does not correspond to any angle in the expected acute range — always take the modulus first.
  • Applying m1m2=−1m_1m_2=-1 to a vertical or horizontal pair. A vertical line has no slope, so it cannot be substituted into this formula; a horizontal and a vertical line are perpendicular by inspection instead.
  • Mixing up parallel with coincident. Equal slopes only guarantee the lines are parallel, not identical — check the intercepts (or a shared point) if the question asks whether two lines are actually the same line.

Ask the tutor: If you get a negative value under the square-root-free tangent formula and are unsure whether to keep or flip the sign, ask the AI tutor to walk through it with your specific pair of slopes.

Why does a vertical line have no slope instead of a slope of zero?

Slope is defined as y2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1}, and for a vertical line every point shares the same xx-coordinate, so x2−x1=0x_2-x_1=0 and the fraction becomes division by zero, which is undefined, not zero. Equivalently, a vertical line has inclination θ=90°\theta=90°, and tan⁡90°\tan 90° is undefined. A slope of exactly zero describes a horizontal line instead, where the numerator vanishes rather than the denominator. Keep these two cases distinct: zero slope means flat, undefined slope means vertical.

Do I always use the acute angle, or can a question want the obtuse one?

The formula tan⁡θ=∣m1−m21+m1m2∣\tan\theta=\left|\dfrac{m_1-m_2}{1+m_1m_2}\right| is built to hand you the acute angle directly, because of the absolute value. If a question explicitly asks for the obtuse angle between two lines, just compute this acute θ\theta first and then subtract it from 180°180°, since the two angles a pair of intersecting lines makes are always supplementary. Unless a question specifies otherwise, "the angle between two lines" conventionally means the acute one.

How is the perpendicular condition m1 times m2 equals negative one actually used in problems?

It usually shows up in two directions. Given both slopes, you check whether their product is −1-1 to confirm perpendicularity, as in the quiz above. Given one slope and asked to find a perpendicular line, you first find the required slope as the negative reciprocal, m2=−1/m1m_2=-1/m_1, and then build the line's equation with point-slope form using a known point, exactly as in the worked example here. Both uses come from the same single equation, just solved for a different unknown.

Before this

Where this leads