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:
[tex]m=\frac{y_2-y_1}{x_2-x_1}=\frac{5-2}{2-2}=\frac{3}{0}=\text{undefined.}[/tex]
It follows that the slope of a vertical line is undefined.