Creating Undefined Slope in Desmos- Step-by-Step Instructions
What Undefined Slope Actually Means
Before touching Desmos, you need to know what you're actually graphing. Undefined slope happens with vertical lines. That's it. There's no calculation involved because the math literally cannot divide by zero.
The formula everyone learns (rise over run) breaks down when the run equals zero. You can't divide by zero. So instead of a number, you get undefined.
Every vertical line has undefined slope. The line x = 3, x = -7, x = 0 — all undefined. The line is straight up and down. The steeper it gets, the closer it comes to this state, but as long as it's truly vertical, slope stays undefined.
Why Students Struggle With This Concept
Textbooks complicate this. They throw around terms like "no slope" and "undefined slope" like they're interchangeable. They're not.
- Undefined slope — the calculation cannot be performed (vertical lines)
- Zero slope — the calculation equals zero (horizontal lines)
A horizontal line has a slope of exactly 0. A vertical line has no slope value at all. Students mix these up constantly because teachers rush through the distinction.
Creating Undefined Slope in Desmos — The Steps
Here's how to actually do it.
Step 1: Open Desmos
Go to desmos.com/calculator. The graphing calculator loads instantly. No account needed for basic use, though creating one lets you save your work.
Step 2: Enter the Vertical Line Equation
Click the expression panel on the left. Type your equation using x = format. Not y = mx + b. That's for sloped lines. Vertical lines use:
x = 3
That creates a vertical line passing through x = 3 on the coordinate plane. The line extends infinitely up and down.
Step 3: Adjust the Viewing Window
By default, Desmos shows x from -10 to 10. Your vertical line might look weird if it sits outside this range. Click the wrench icon to adjust:
- X-axis range: set it to capture your line's location
- Y-axis range: keep it wide enough to see the full line
Step 4: Add Multiple Vertical Lines
Need to show several undefined slopes? Just add more equations:
x = -2
x = 0
x = 5
Each one graphs as a separate vertical line with undefined slope.
Common Mistakes That Ruin Your Graph
Mistake 1: Using y = Instead of x =
If you type y = 3, you get a horizontal line with zero slope. That's the opposite of what you want. Remember: horizontal = zero, vertical = undefined.
Mistake 2: Trying to Calculate Slope
Desmos won't give you a slope value for vertical lines. If you try to use the slope tool on a vertical line, it either fails or shows infinity. That's correct behavior — undefined isn't a number you can display.
Mistake 3: Forgetting the Equals Sign
Type x 3 without the equals sign and Desmos treats it as an expression, not an equation. Nothing graphs. Always use x = [value].
Visual Comparison: Vertical vs Horizontal Lines
| Line Type | Equation Format | Slope Value | Visual |
|---|---|---|---|
| Vertical | x = constant | Undefined | Straight up/down |
| Horizontal | y = constant | 0 | Straight left/right |
| Slanted (positive) | y = mx + b, m > 0 | Positive number | Rises right |
| Slanted (negative) | y = mx + b, m < 0 | Negative number | Falls right |
How to Show Undefined Slope in Desmos Activities
Teachers often use Desmos for classroom activities. Here's how to set up an undefined slope demonstration:
- Create a new Desmos activity at teacher.desmos.com
- Add a graph component
- Pre-load the equation
x = 2 - Add a question card asking students to identify the slope type
- Students can experiment by changing the number and observing the vertical line move
Quick Reference: Desmos Commands for Vertical Lines
x = a— vertical line at x = ax = -5— vertical line at x = -5x = 0— the y-axis itself (also undefined slope)
That's literally all you need. The equation format never changes. Just swap out the number.
Why This Matters for Standard Form
When you graph equations in standard form (Ax + By = C), vertical lines appear when B = 0. The equation collapses to Ax = C, which simplifies to x = C/A — a vertical line.
Desmos handles standard form directly. Type 2x + 0y = 6 and you get the same vertical line as x = 3. The calculator simplifies automatically.
The Bottom Line
Undefined slope in Desmos is dead simple. Type x = [whatever number you need]. That's the whole process. Students overcomplicate this because they forget vertical lines don't follow the slope formula — they exist outside it.
If your students are stuck, check if they're accidentally typing y = instead of x =. That's the error in 90% of cases.