# What is the slope of the line x=-2?

If a line has the equation $x = k$, where $k$ is a constant, it is a vertical line. A vertical line has an undefined slope.
The equation for slope is $\frac{{y}_{1} - y}{{x}_{1} - x}$. If the equation is $x = - 2$, we can substitute this value into $\frac{{y}_{1} - y}{{x}_{1} - x}$ to get (y_1-y)/(-2-(-2), and simplifying this equation makes the denominator $0$, which is undefined.