Write the equation of a line in y = mx + b form given the slope and a point on the line. The y-intercept b is computed independently from b = y₀ - m·x₀ and verified by substituting the point back.

Example

Find b, then write the line as y = mx + b. This form names a line by two facts: its slope, how fast it rises, and its y-intercept, where it crosses the vertical axis. Once you know the slope and one point, you solve for the intercept, and the resulting equation lets you find the y for any x on the line.

highlighted = computed this step

Step 1 — Set up

Set up the expression.

m=2, (1,5)m= 2 ,\ ( 1 , 5 )
Use slope m = 2 and point (1, 5).(1, 5)b=3givenm = 2 point (1, 5)put the point into y = mx + bsolve for bresult--

Step 2 — Substitute

Substitute the point: 5 = 2 x 1 + b.

5=2×1+b\hl{5} = \hl{2} \times \hl{1} +b
Substitute the point into y = mx + b.(1, 5)b=3givenm = 2 point (1, 5)5 = 2 * 1 + bsolve for bresult--

Step 3 — Find b

Solve for b: 5 - 2 x 1 = 3.

b=52×1=3b= 5 - 2 \times 1 = \hl{3}
Solve for b: b = 5 - 2 * 1 = 3.(1, 5)b=3givenm = 2 point (1, 5)5 = 2 * 1 + bb = 5 - 2 * 1 = 3result--

Step 4 — Result

Write y = 2x + 3.

y=2x+3y= 2x + 3
Write the line: y = 2x + 3.(1, 5)b=3givenm = 2 point (1, 5)5 = 2 * 1 + bb = 5 - 2 * 1 = 3resulty = 2x + 3 y-intercept 3
slope-intercept-form Given slope m and a point (x₀, y₀), solve for b: b = y₀ - m·x₀. Then write y = mx + b. The point (x₀, y₀) must satisfy the line: m·x₀ + b = y₀.