Yes, we can graph a line if its slope is undefined.
Work Step by Step
A line that has an undefined slope is vertical. An example would be the line $x=3$. Even though the slope is undefined, we can graph this line by drawing a vertical line with an $x$-intercept of $3$.