y = 2x + 2
the equation of a line in slope-intercept form is
y = mx + c ( m is the slope and c the y-intercept )
to calculate m use the gradient formula
m = (y₂ - y₁ ) / (x₂ - x₁ )
with (x₁, y₁ ) = (- 4, - 6) and (x₂, y₂ ) = (2, 6 ) ← 2 points on the line
m =
=
= 2
the line crosses the y-axis at (0, 2 ) ⇒ c = 2
y = 2x + 2 ← equation of line