I believe the slope of any vertical line is "undefined" because slope= rise(change in y values)/ run(change in x values).
Therefore, the slope for a horizontal line is
m= 0/(x2-x1).
However, for a vertical line the x-values are the values that are not changing. So, m= (y2-y1)/0. It is not possible to divide anything by zero. So, the slope of a vertical line is reported as m= undefined.
Any questions?