### 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$$. Slope, $$m = \tan \theta$$

$$= \frac{\text{Opposite side}}{\text{Adjacent side}}$$

$$=$$ $\frac{\mathit{BC}}{\mathit{AC}}$

$$=$$ $\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$

Note: $\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}=\frac{{y}_{1}-{y}_{2}}{{x}_{1}-{x}_{2}}$
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}}$$ $$=$$ $\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$
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] 2. $$0^\circ < \theta < 90^\circ$$ The line has a positive slope (A line with a positive slope rises from left to right). 3. $$90^\circ < \theta < 180^\circ$$ The line has a negative slope (A line with a negative slope falls from left to right). 4. $$\theta = 180^\circ$$ The line is parallel to the negative direction of the $$X$$-axis. [Zero slope] 5. $$\theta = 90^\circ$$ The slope is undefined. Important!
The points are collinear if the slopes between any two pairs of points are equal.