Graphing a linear equation of the form y = mx + b

Slope
=
  (p2.y - p1.y)
(p2.x - p1.x)
Divide the difference of the y values of the points by the difference of the x values.
=
  (1 - 5)
(3 - 1)
Point 1 or Point 2 can be first, but ensure the same order is used
=
  -4
2
in both numerator and denominator
=
-2

Y Intercept
=
p1.y - (Slope × p1.x)
Use the Slope and Point 1 to work back to the Y Axis, where X = 0
=
5 - (-2 × 1)
=
7

X Intercept
=
p1.x -
  p1.y
Slope
Use the Slope and Point 1 to work back to the X Axis, where Y = 0
=
1 -
  5
-2
=
3.5

Graphing Linear Equations

We hope you find our linear equation graphing page useful. Follow this link for a detailed explanation on how to solve a Linear Equation from two points in Slope-Intercept form