Two points
m = (y₂ − y₁)/(x₂ − x₁). From (1, 2) to (4, 8), the slope is (8 − 2)/(4 − 1) = 6/3 = 2. Reverse both subtractions and m is still 2.
Type two points or snap the line. Rise over run, including zero and undefined.
The definition of slope is rise over run: vertical change in y divided by horizontal change in x. Stephen AI is the tutor on that walkthrough, from two points on a graph to the sign of m.
m = (y₂ − y₁)/(x₂ − x₁). From (1, 2) to (4, 8), the slope is (8 − 2)/(4 − 1) = 6/3 = 2. Reverse both subtractions and m is still 2.
Positive m climbs from left to right. Negative m falls. Zero is horizontal, y = c. Undefined is vertical, x = c, because the run is 0.
Parallel lines share the same m. Perpendicular slopes multiply to −1, and 2 × (−1/2) = −1. OpenStax checks that test with 3 and −1/3.
The slope of a line is the ratio of the vertical change in y to the horizontal change in x between any two points on the line. That ratio is rise over run, written m. A positive slope slants upward to the right, and a negative slope slants downward. OpenStax Algebra and Trigonometry 2e, section 2.2, defines it this way.
For points (x₁, y₁) and (x₂, y₂), m = (y₂ − y₁) / (x₂ − x₁). The numerator is the rise and the denominator is the run. Use the same point first in both the numerator and the denominator. Swapping which point is first flips both signs and leaves m unchanged.
Label the points and subtract in one order. For (1, 2) and (4, 8), m = (8 − 2) / (4 − 1) = 6/3 = 2. The line rises 6 units while it runs 3, so it climbs 2 for each unit to the right. The reverse order, (2 − 8) / (1 − 4) = (−6)/(−3) = 2, matches. On homework, write that subtraction yourself. Do not submit an app write-up as your own.
The four types are positive, negative, zero, and undefined. Positive climbs from left to right. Negative falls from left to right. Zero is a horizontal line, y = c, because the rise is 0. Undefined is a vertical line, x = c, because the run is 0 and division by zero is undefined.
An undefined slope means the line is vertical, written x = c. Any two points share an x-coordinate, so the run is 0 and the slope formula divides by zero. That is not a slope of 0. OpenStax Algebra and Trigonometry 2e, section 2.2, shows points with the same x-coordinate and calls the slope undefined.
The slope of a horizontal line is 0. Its equation is y = c, so the y-coordinates match, the rise is 0, and m = 0 divided by the run. OpenStax Algebra and Trigonometry 2e, section 2.2, states that the slope of a horizontal line is zero.
Pick two points on the line with integer coordinates. From the left point, count the vertical change (rise) and the horizontal change (run), then divide. Up is a positive rise and down is negative. From (1, 2) to (4, 8), the rise is 6 and the run is 3, so m = 6/3 = 2.
Parallel lines have the same slope and different y-intercepts. Perpendicular lines form a right angle, and the product of their slopes is −1. OpenStax Algebra and Trigonometry 2e, section 2.2, checks this with slopes 3 and −1/3, because 3 × (−1/3) = −1. The same test says a line of slope 2 is perpendicular to a line of slope −1/2, because 2 × (−1/2) = −1. A vertical line is the exception: its slope is undefined, and it is perpendicular to a horizontal line.