The slope of a line that passes through points (x1, y1) and (x2, y2) is:
[tex]m=\frac{y_2-y_1}{x_2-x_1}[/tex]When the numerator is equal to zero, the slope is equal to zero.
When the denominator is equal to zero, the slope is undefined (you can't divide by zero).