On the Subject of Line Equations
Lemme get this lined...
On the top display, the first point is (x₁, y₁) and the second point is (x₂, y₂).
Calculate m and c according to their formulas below.
m = (y₂ - y₁) / (x₂ - x₁)
c = (x₁y₂ - x₂y₁) / (x₁ - x₂)
Round both of them to three decimal places.
Input the answer in the form of “mx + c”, substituting m’s and c’s values into it. If c is negative, don’t write “+ -”: drop the “+” instead (e.g. “-1.467x - 5.462”).