How to make a line segment in Desmos
To make a line in Desmos, type its equation: y = 2x + 1. To make it a segment that stops at both ends, add a restriction in curly braces: y = 2x + 1 {0 < x < 3}.
y = 2x + 1 {0 < x < 3}(1 + 3t, 2 + 6t)Step by step
- 1For a full line, type
y = 2x + 1. - 2For a segment, add the range of x in curly braces:
y = 2x + 1 {0 < x < 3}. - 3For a vertical line, type
x = 3. For a horizontal one, typey = 2.
A segment between two exact points
To go from (a, b) to (c, d), use (a + (c - a)t, b + (d - b)t). Since t runs from 0 to 1 by default, it starts at the first point and stops at the second. This method handles any segment, including a vertical one.
Dashed lines
Click and hold the coloured icon beside the expression to choose a dashed or dotted line, and to change its thickness.
From two points to an equation
If you have two points but no equation, use the slope calculator. For how the numbers in y = mx + b work, see slope-intercept form.
Frequently asked questions
How do I make a line segment in Desmos?
How do I draw a vertical line in Desmos?
How do I make a dashed line?
Keep going
Join points from a table.
How curly braces work.
The equation through two points.
Type cbrt for ∛, and how to type other symbols.
Make a list, then type stdev(L), mean(L) or median(L).
Use an inequality, or shade between curves with a < y < b.
The same equations work here, with algebra, steps and exports built in. It is free, with no account.