Question: how to calculate the slope of a vertical line?
Answer: The slope of a vertical line does not exist! We can't divide by zero, which is of course why this slope value is "undefined". This relationship is always true: a vertical line will have no slope, and "the slope is undefined" or "the line has no slope" means that the line is vertical.