Recall that slope is given by m = (y2 - y1)/(x2 - x1). In this examle, we can let (x1,y1) = (8,1) and (x2,y2) = (8,-4). Plugging this into the formula, we have m = (-4 - 1)/(8 - 8) = -5/0. However, since division by 0 is not allowed, the slope is undefined.
Notice that since the x values of these two points are the same, the line determined by these points is a vertical line. In general, the slope of vertical lines is undefined, while the slope of horizontal lines is 0.