You can put this solution on YOUR website! What is the slope of a verticale and horizontal line?
The slope of the line is given by m = tan , where is the angle made by the given line with X axis.
A vertical line makes angle with the X axis.
m=tan is udefined or infinity
A horizontal line is a line parallel to the X axis, =0
m=tan 0 = 0
The slope of a vertical line is infinity; the slope of a horizontal line is zero.
Consider, for example, the two points (5,7) and (5,9).
They are on a vertical line.
Plug those coordinates into the slope formula
Afterward you'll find the denominator turns to 0. This is a problem.
We cannot have 0 in the denominator. This leads to "undefined".
Now consider the two points (1,2) and (5,2) which are on a horizontal line.
Plug those coordinates into the slope formula mentioned earlier, and you'll get a slope of 0. This time the numerator is 0 which is allowed.
0/x = 0 when x is nonzero.