The fastest way to connect two points

To connect two points in Desmos, enter a linear equation that passes through both of them. If you know the coordinates of your two points, you can find the slope and write the equation in slope-intercept form (y = mx + b), then type it into the graphing calculator. Desmos will draw the line automatically.

The other method is to use Desmos's table feature: enter your two points as rows in a table, then switch the table to a line graph. This works well if you want to see the points plotted first and then connect them visually, without calculating the equation yourself.

Key Takeaways

  • You can connect two points by finding the slope between them, writing a linear equation, and typing it into Desmos.
  • The slope formula is m = (y₂ − y₁) / (x₂ − x₁), and once you have the slope, use y = mx + b to find the full equation.
  • Using Desmos's table feature lets you enter your two points as data and graph them as a line without calculating the equation manually.
  • You can also use the point-slope form y − y₁ = m(x − x₁) and type it directly into Desmos if you prefer not to rearrange to slope-intercept form.

Finding the equation using slope and a point

Start with your two points. Let's say they are (2, 3) and (5, 9). The first step is to find the slope, which tells you how steep the line is.

Use the slope formula: m = (y₂ − y₁) / (x₂ − x₁). Plug in your coordinates: m = (9 − 3) / (5 − 2) = 6 / 3 = 2. Your slope is 2.

Now use the slope-intercept form y = mx + b. You know m = 2. Pick one of your points — say (2, 3) — and substitute it in: 3 = 2(2) + b, which gives 3 = 4 + b, so b = −1. Your equation is y = 2x − 1.

Type y = 2x - 1 into the Desmos input box and press Enter. The line will appear on the graph, passing through both of your points.

Using point-slope form if you don't want to rearrange

If you have the slope and one point but don't want to solve for b, you can type the equation directly in point-slope form: y − y₁ = m(x − x₁).

With the same example (points (2, 3) and (5, 9), slope 2), type y - 3 = 2(x - 2) into Desmos. The calculator will graph it as a line. You don't need to simplify it first — Desmos understands the form and will draw the line correctly.

This method is useful when you're working quickly or when you want to avoid algebra mistakes. The downside is that the equation looks less clean on the graph label, but the line itself is identical.

Connecting points using Desmos's table feature

Open Desmos and click the plus sign (+) in the top left. Select "Table" from the menu. A table will appear with two columns labeled x₁ and y₁.

Enter your first point's x-coordinate in the first row under x₁, and its y-coordinate in the same row under y₁. Enter your second point in the second row. For the example above, row 1 would be x₁ = 2, y₁ = 3, and row 2 would be x₁ = 5, y₁ = 9.

Once both points are entered, Desmos will plot them on the graph. Click the gear icon next to the table title to open the table settings. Under "Lines", select the option to connect the points. Desmos will draw a line through them automatically.

This method is helpful if you're building a dataset or if you want to see the points plotted before deciding whether to extend the line beyond them.

Extending the line beyond your two points

By default, Desmos draws the entire line, not just the segment between your two points. If you want to restrict the line to only the segment connecting the two points, you need to use a restricted domain.

After you've entered your equation (for example, y = 2x − 1), click on it in the input list. A menu will appear. Look for the option to add restrictions. You can then specify that x should only be graphed between 2 and 5 (the x-coordinates of your two points).

Type something like y = 2x − 1 {2 ≤ x ≤ 5} to draw only the segment. The curly braces tell Desmos to restrict the domain. If you want the full line instead, just leave the equation without restrictions.

Checking your work

After you've drawn the line, verify that it passes through both points. Click on the line on the graph, and Desmos will highlight it and show the equation in the input list. Hover over each of your original points to see their coordinates displayed.

If the line doesn't pass through both points, check your slope calculation and your equation. A common mistake is mixing up the order of subtraction in the slope formula — remember that the order must be consistent for both the numerator and denominator.

You can also use Desmos's point-plotting feature to mark your two points explicitly. Type the coordinates as ordered pairs — for example, (2, 3) and (5, 9) — on separate input lines. Desmos will plot them as dots, making it easy to see whether your line passes through them.

Frequently Asked Questions

What if my two points have the same x-coordinate?

If both points are directly above or below each other, the line is vertical and has an undefined slope. You cannot write it in the form y = mx + b. Instead, type x = [number] — for example, if both points have x = 3, type x = 3. Desmos will draw a vertical line through both points.

Can I connect more than two points with a single line?

Yes. If you have three or more points that all lie on the same line, the equation that passes through any two of them will pass through all of them. If your points don't all lie on the same line, you'll need to use a different method, such as a curve fit or a piecewise function, depending on what you're trying to show.

How do I label the points on the graph?

After you've plotted your points, click on each one. A label option will appear. You can type a custom label — for example, "Point A" or "(2, 3)" — and Desmos will display it next to the point on the graph.

What's the difference between a line and a line segment in Desmos?

A line extends infinitely in both directions. A line segment has two endpoints. To draw a line segment in Desmos, use the domain restriction syntax shown above — for example, y = 2x − 1 {2 ≤ x ≤ 5} — which restricts the graph to only the part between your two points.