I think the best way to explain this is that the rise over run of the vertical line is consider as 1/0 which means that the said equation has a y coordinate of zero and any number that has a denominator of zero is undefined, so the slope of the vertical line is undefined. I hope this would help