Given two points, first find the gradient. Substitute the gradient and either point into \(y=mx+c\) to find \(c\). The equivalent form \(y-y_1=m(x-x_1)\) is useful when one point and the gradient are known.
Example
Through \(A(-1,1)\) and \(B(3,4)\), \(m=\dfrac{4-1}{3-(-1)}=\dfrac34\). Using \(B\), \(4=\dfrac34(3)+c\), so \(c=\dfrac74\).
The line is \(y=\dfrac34x+\dfrac74\), or \(4y=3x+7\). Substituting \(A\) gives \(4=3(-1)+7\), confirming the second point.
If both points have the same \(x\)-coordinate, the line is vertical. Through \((2,-1)\) and \((2,5)\), its equation is \(x=2\); no gradient calculation is needed.
Create a free account to practise similar questions.
Need help? Join our E-Maths tuition for O-Level success.
Learn more