To find the slope of a line given two points, use the formula:
m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2−x1y2−y1
where:
- (x1,y1)(x_1,y_1)(x1,y1) are the coordinates of the first point,
- (x2,y2)(x_2,y_2)(x2,y2) are the coordinates of the second point,
- mmm is the slope of the line.
Steps to find the slope:
- Identify the coordinates of the two points: (x1,y1)(x_1,y_1)(x1,y1) and (x2,y2)(x_2,y_2)(x2,y2).
- Calculate the difference in the y-coordinates (vertical change or "rise"): y2−y1y_2-y_1y2−y1.
- Calculate the difference in the x-coordinates (horizontal change or "run"): x2−x1x_2-x_1x2−x1.
- Divide the difference in y by the difference in x to get the slope:
m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2−x1y2−y1
Example: For points A(2,3)A(2,3)A(2,3) and B(7,8)B(7,8)B(7,8):
- Rise = 8−3=58-3=58−3=5
- Run = 7−2=57-2=57−2=5
- Slope m=55=1m=\frac{5}{5}=1m=55=1
So, the slope of the line passing through points A and B is 1
. Additional notes:
- The slope represents the steepness of the line.
- If the run (denominator) is zero (i.e., x2=x1x_2=x_1x2=x1), the slope is undefined because the line is vertical.
- The slope can be positive, negative, zero (horizontal line), or undefined (vertical line)