Find the Equation of a Line Through Two Points

Put two points into a Desmos table and run y1 ~ m*x1 + b to read slope and intercept.

Worked problem

A line passes through (2, 5) and (6, 17). Which equation defines the line?

Target answer: y = 3x − 1.

What to enter in the calculator

  • table: (2,5), (6,17)
  • y_1 ~ m*x_1 + b

Step-by-step calculator moves

  • Click the + icon and choose Table, then enter (2, 5) and (6, 17).
  • On the next line, type y1 ~ m*x1 + b (Desmos converts 1 into subscripts automatically).
  • Read m = 3 and b = −1 directly under Parameters.
  • Match y = 3x − 1 against the answer choices.

Check the math

Check both points on the plotted line: 3(2) − 1 = 5 and 3(6) − 1 = 17.

When to skip the graph

When both x-coordinates are small integers, mental slope (17 − 5)/(6 − 2) = 3 is even faster.

Connected book chapter, skill, and practice

Maps to Chapter 17 (Linear Equations in Two Variables and Linear Functions) and the Linear Equations in Two Variables skill guide.

SAT® and AP® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website or book. PSAT/NMSQT® is a registered trademark of the College Board and the National Merit Scholarship Corporation, which are not affiliated with, and do not endorse, this site. Bluebook™ is a trademark of the College Board. ACT® is a trademark of ACT Education Corp., which is not affiliated with and does not endorse this website or book. Desmos is a trademark of Desmos Studio PBC.

Last updated .