NEETJEE.guru
MathematicsJEE

Slope of a Line Through Two Given Points

By Admin 13 November 2026 Updated 27 November 2026 9 min read 13 views
On this page· 13 sections
Overview

Source & scope. Class 11 Mathematics, Chapter 9 Straight Lines, Section 9.2.1. Builds on: Inclination and Slope of a Line (Ch 9, §9.2), which defines slope via m = tan θ. This article converts that angle-based definition into a purely coordinate-based formula, since a line is completely determined o...

Source & scope. Class 11 Mathematics, Chapter 9 Straight Lines, Section 9.2.1. Builds on: Inclination and Slope of a Line (Ch 9, §9.2), which defines slope via m = tan θ. This article converts that angle-based definition into a purely coordinate-based formula, since a line is completely determined once two points on it are known.

The slope of a line passing through two points P(x1, y1) and Q(x2, y2), with x1 ≠ x2, is given by m = (y2 − y1)/(x2 − x1). This single formula holds regardless of whether the line's inclination is acute or obtuse, and it is the most frequently used slope formula in coordinate geometry.

At a glance

  • Formula: , valid whenever x1 ≠ x2.
  • A line is completely determined by any two points on it, so this formula gives a unique slope.
  • If x1 = x2, the line is vertical and the slope is not defined (division by zero).
  • If y1 = y2, the line is horizontal and the slope is 0.
  • The same formula applies whether the line's inclination is acute or obtuse.

Learning objectives

  • State and apply the two-point slope formula.
  • Explain why the formula is identical for both the acute- and obtuse-inclination cases.
  • Recognise when the formula produces an undefined slope and interpret it correctly.
  • Use the formula to compute slope in a worked numerical problem.

Prerequisite knowledge

The reader should already know the definition of inclination and slope (m = tan θ) and be comfortable plotting two points and drawing perpendiculars to the axes.

Core explanation

Setting up the two cases. Let P(x1, y1) and Q(x2, y2) be two points on a non-vertical line l with inclination θ. Since the line is non-vertical, x1 ≠ x2 — if x1 = x2 the line would be perpendicular to the x-axis and its slope would not be defined. To find m = tan θ purely from the coordinates, drop a perpendicular QR from Q to the x-axis and a perpendicular PM from P to the line RQ, forming a right triangle ΔMPQ. The inclination θ may be acute or obtuse, and NCERT works through both.

Case I — θ acute. When θ is acute, the angle ∠MPQ inside the right triangle equals θ itself. In the right triangle, tan θ = tan(∠MPQ) = MQ/MP. Reading off the coordinates, MQ = y2 − y1 and MP = x2 − x1, so

Case II — θ obtuse. When θ is obtuse, the angle inside the triangle is ∠MPQ = 180° − θ, so θ = 180° − ∠MPQ. Then m = tan θ = tan(180° − ∠MPQ) = −tan(∠MPQ) = −MQ/MP. Working through the coordinate differences carefully (the perpendicular now falls on the other side, flipping both the horizontal and vertical legs' signs), this again simplifies to m = (y2 − y1)/(x2 − x1) — the two minus signs introduced by the obtuse geometry cancel each other.

Why one formula suffices. The remarkable (and exam-useful) conclusion is that both cases give exactly the same formula. A student never needs to check whether the inclination is acute or obtuse before applying the slope formula — the formula m = (y2 − y1)/(x2 − x1) is unconditionally correct for any non-vertical line through two known points, and it is symmetric in the sense that swapping which point is "first" and which is "second" gives the same value, since (y2−y1)/(x2−x1) = (y1−y2)/(x1−x2).

The vertical-line exception. If x1 = x2, the denominator becomes zero and the formula is undefined — this is not a flaw in the formula but the correct reflection of the fact that a line through two points with equal x-coordinates is vertical, and a vertical line has no defined slope (as established in the companion article on inclination and slope).

Key terms

  • Two-point slope formula — m = (y2 − y1)/(x2 − x1), for x1 ≠ x2.
  • Rise — the vertical difference y2 − y1 between two points on a line.
  • Run — the horizontal difference x2 − x1 between two points on a line.
  • Undefined slope — occurs exactly when x1 = x2, i.e., the two points lie on a vertical line.
  • Zero slope — occurs exactly when y1 = y2, i.e., the two points lie on a horizontal line.

Diagram / figure guidance

Draw two points P(x1,y1) and Q(x2,y2) joined by a line segment; drop a perpendicular from Q to a horizontal line through P, forming a right triangle with legs labelled "rise = y2 − y1" (vertical leg) and "run = x2 − x1" (horizontal leg). Show this once for an acute-inclination line and once for an obtuse-inclination line, so the reader sees both configurations reduce to the same ratio.

Worked example

Find the slope of the lines: (a) passing through the points (3, −2) and (−1, 4); (b) passing through the points (3, −2) and (7, −2); (c) passing through the points (3, −2) and (3, 4).

(a) Here (x1,y1) = (3,−2) and (x2,y2) = (−1,4). m = (4 − (−2))/(−1 − 3) = 6/(−4) = −3/2. The slope is negative, consistent with a line that falls from upper-left to lower-right (obtuse inclination).

(b) Here (x1,y1) = (3,−2) and (x2,y2) = (7,−2). m = (−2 − (−2))/(7 − 3) = 0/4 = 0. Both points share the same y-coordinate, so this is a horizontal line, correctly giving slope 0.

(c) Here (x1,y1) = (3,−2) and (x2,y2) = (3,4). m = (4 − (−2))/(3 − 3) = 6/0, which is not defined. Both points share the same x-coordinate, so this is a vertical line, and the formula correctly signals "no defined slope" via the zero denominator rather than producing a numeric answer.

Common misconceptions

  • "If the denominator works out to zero, just treat the slope as infinity." NCERT's convention is that the slope is simply undefined in this case, not "infinite" — there is no number tan 90° to assign.
  • "The order in which the two points are labelled (x1,y1) vs (x2,y2) changes the slope." It does not: (y2−y1)/(x2−x1) = (y1−y2)/(x1−x2), since reversing both the numerator and denominator signs leaves the ratio unchanged.
  • "A different formula is needed depending on whether the inclination is acute or obtuse." False — NCERT's derivation shows both cases collapse to the identical formula m = (y2−y1)/(x2−x1).
  • "Any two points determine a slope." Only true if the two points are distinct and do not share the same x-coordinate; identical points give an undefined (0/0) expression, and equal x-coordinates give an undefined (nonzero/0) slope.

Exam application (JEE)

This formula is the single most-used computational tool in the entire chapter: almost every subsequent topic (parallel/perpendicular conditions, angle between lines, all forms of the equation of a line) begins by computing a slope from two given points. JEE questions frequently embed this formula inside multi-step problems — for instance, computing the slope of a diagonal of a quadrilateral, or of a median of a triangle — so fluency in applying it correctly (including recognising the undefined and zero special cases) is essential rather than optional.

Frequently asked questions

  • What is the formula for the slope of a line through two points? The slope of a line through P(x1,y1) and Q(x2,y2), with x1 ≠ x2, is m = (y2 − y1)/(x2 − x1).
  • Does it matter which point is labelled first? No — swapping the labels of the two points leaves the slope unchanged, since (y2−y1)/(x2−x1) equals (y1−y2)/(x1−x2).
  • What does it mean if the two-point slope formula gives 0/0? It means the two "points" are actually the same point, so no unique line (and hence no slope) is determined.
  • When is the slope of a line through two points undefined? Whenever the two points have the same x-coordinate (x1 = x2), making the line vertical.
  • Is the same formula used for acute and obtuse lines? Yes — NCERT proves both the acute-inclination and obtuse-inclination cases simplify to the same formula m = (y2 − y1)/(x2 − x1).

Practice questions (original practice questions)

  1. The slope of the line through (2, 5) and (6, 13) is:
    • (a) 2
    • (b) 4
    • (c) 1/2
    • (d) −2
    • Answer: (a) — m = (13−5)/(6−2) = 8/4 = 2.
  2. The slope of the line through (−3, 4) and (1, 4) is:
    • (a) 0
    • (b) undefined
    • (c) 1
    • (d) 4
    • Answer: (a) — Equal y-coordinates give a horizontal line, m = 0.
  3. The slope of the line through (5, −1) and (5, 9) is:
    • (a) 0
    • (b) 10
    • (c) undefined
    • (d) −1
    • Answer: (c) — Equal x-coordinates give a vertical line, so the slope is undefined.
  4. The slope of the line through (−2, 3) and (4, −3) is:
    • (a) 1
    • (b) −1
    • (c) 2
    • (d) −2
    • Answer: (b) — m = (−3−3)/(4−(−2)) = −6/6 = −1.
  5. If the slope of the line through (k, 2) and (3, 8) is 2, the value of k is:
    • (a) 0
    • (b) −1
    • (c) 1
    • (d) 2
    • Answer: (a) — (8−2)/(3−k) = 2 ⟹ 6 = 2(3−k) ⟹ 3 = 3−k ⟹ k = 0.

Quick revision

  • m = (y2 − y1)/(x2 − x1), valid for x1 ≠ x2.
  • Formula is identical for acute and obtuse inclinations — no case-checking needed.
  • Order of the two points does not affect the computed slope.
  • x1 = x2 ⟹ slope undefined (vertical line); y1 = y2 ⟹ slope 0 (horizontal line).
  • This formula underlies every later slope-based test in the chapter (parallel, perpendicular, angle, collinearity).

Related articles

NCERTMathematicsClass 11
Rate this article
No ratings yetSign in to rate

0 Comments

Sign in to join the discussion.

Slope of a Line Through Two Points — JEE Notes | NEETJEE.guru