To graph a vertical line, plot a point that the line passes through, and then draw a line through the point which is parallel to the y-axis.
A vertical line passing through a point is shown below:
Next, choose two points on the line to calculate the slope.
Two points on the line are (2,2) and (2,5).
Substitute (x1,y1)=(2,2) and (x2,y2)=(2,5) into the equation for the definition of a slope:
![m=(y_2-y_1)/(x_2-x_1)=(5-2)/(2-2)=(3)/(0)=\text{undefined.}]()
It follows that the slope of a vertical line is undefined.