Use two coordinate points to find slope, then use one point to write and verify the line equation.

Example

Plot a line through two points, then derive its equation.

highlighted = computed this step

Step 1 — Plot the line

Plot the line through the two points.

Coordinate plot\text{Coordinate plot}
Slope and equation plotLine through A(1, 3) and B(3, 7).lineAB

Step 2 — Read two points

Read the two points on the line.

A=(1,3)B=(3,7)A=( \hl{1} , \hl{3} ) \quad B=( \hl{3} , \hl{7} )

Step 3 — Compute slope

Use rise over run to find the slope.

m=(73)/(31)=2m=( 7 - 3 )/( 3 - 1 )= \hl{2}

Step 4 — Find intercept

Substitute one point to find b.

b=321=1b= 3 - 2 \cdot 1 = \hl{1}

Step 5 — Equation

Write the slope-intercept equation.

y=2x+1y= \hl{2} x + \hl{1}

Step 6 — Verify point

Check another point in the equation.

At x=2:5=22+1\text{At }x= 2 : \hl{5} = 2 \cdot 2 + 1
slope-and-equation m = (y2-y1)/(x2-x1), then y = mx + b