• Skip to primary navigation
  • Skip to main content
  • Skip to footer
Basic Mathematics
  • ⌕
Slope of a Line: Two Points, Signs and the Line Equation

Slope of a Line: Two Points, Signs and the Line Equation

Written by Jean Carlos Novaes

A line’s slope compares the change in its vertical coordinate with the corresponding horizontal change. It tells you how much y changes when x increases by one. A positive slope rises from left to right; a negative slope falls. A horizontal line has slope zero, while a vertical line has no defined finite slope.

Divide the vertical change by the horizontal change

Choose two distinct points and subtract their coordinates in the same order. Reversing both subtractions leaves the quotient unchanged; reversing only one changes its sign incorrectly. The horizontal difference must be nonzero.

m=ΔyΔx
m=y2−y1x2−x1
m=tanθ

The angle θ is measured counterclockwise from the positive x-axis. Its tangent gives the slope only when defined. At 90° the line is vertical. An apparent angle in a stretched diagram can be misleading: compare coordinate changes, or use equal axis scales.

Worked example: A(−2, 3) and B(4, 1)

Moving from A to B increases x by 6 and decreases y by 2. Divide −2 by 6 and simplify. The negative result agrees with the descending line.

m=1−34−(−2)
m=−26=−13

From a point and slope to the line equation

If the known point has coordinates indexed by zero, every point on the line satisfies the following point-slope equation. It remains valid when m is zero but does not describe a vertical line.

y−y0=m(x−x0)

For a line through (2, 3) with slope 2, substitute, expand the brackets and collect the terms. Both final forms describe the same line.

y−3=2(x−2)
y=2x−1
2x−y−1=0

Change the slope and intercept

Move either slider. The line represents y = mx + b; the text states both parameters. A vertical line is outside this finite-slope model.

Slope is not the distance between two points: a ratio describes direction, whereas distance describes separation. When axes carry physical units, slope has vertical units divided by horizontal units.

References

  • OpenStax. Elementary Algebra 2e: Slope of a Line.
Jean Carlos Novaes

About Jean Carlos Novaes

I hold a degree in Computer Science from the Federal University of Bahia (2017) and I am the editor and founder of this website.

Footer

Basic Mathematics

Basic Mathematics website with clear school content for elementary and high school students. Learn easily and efficiently!

ABOUT

  • About Us
  • Contact
  • Site Map

LEGAL

  • How to Cite
  • Cookie Policy
  • Privacy Policy
  • Content License
English
  • Portuguese (Português)
  • Danish (Dansk)
  • German (Deutsch)
  • English
  • Spanish (Español)
  • Finnish (Suomi)
  • French (Français)
  • Italian (Italiano)
  • Dutch (Nederlands)
  • Norwegian (Norsk)
  • Polish (Polski)
  • Portuguese (Portugal)
  • Swedish (Svenska)

© 2015–2026 · Basic Mathematics · All rights reserved.