Theory:

Let \(A(x_1, y_1)\) and \(B(x_2, y_2)\) be two points on non-vertical line \(l\) whose inclination is \(\theta\), where \(x_1 \ne x_2\).
 
graph2.png
 
Slope, \(m = \tan \theta\)
 
\(= \frac{\text{Opposite side}}{\text{Adjacent side}}\)
 
\(=\) BCAC
 
\(=\) y2y1x2x1
 
Note: y2y1x2x1=y1y2x1x2
The slope of the line through \((x_1, y_1)\) and \((x_2, y_2)\), with \(x_1 \ne x_2\) is:
 
\(m = \frac{\text{change in} \ y \ \text{coordinates}}{\text{change in} \ x \ \text{coordinates}}\) \(=\) y2y1x2x1
Values of slopes based on the angle
There are four types of slopes.
 
(i) It can be positive.
 
(ii) It can be negative.
 
(iii) It can be zero.
 
(iv) It can be undefined.
S. No.
Condition (angle)
Slope
Diagram
1.
\(\theta = 0^\circ\)
The line is parallel to the positive direction of the \(X\)-axis. [Zero slope]graph3.png
2.
\(0^\circ < \theta < 90^\circ\)
The line has a positive slope (A line with a positive slope rises from left to right).graph4.png
3.
\(90^\circ < \theta < 180^\circ\)
The line has a negative slope (A line with a negative slope falls from left to right).graph5.png
4.
\(\theta = 180^\circ\)
The line is parallel to the negative direction of the \(X\)-axis. [Zero slope]graph6.png
5.
\(\theta = 90^\circ\)
The slope is undefined.graph7.png
 
Important!
The points are collinear if the slopes between any two pairs of points are equal.