A straight line may be written in the general form \(ax+by=k\), where \(a\), \(b\) and \(k\) are constants, and \(a\) and \(b\) are not both zero.
When \(a\ne0\) and \(b\ne0\), rearranging gives \(y=-\dfrac{a}{b}x+\dfrac{k}{b}\). Hence the gradient is \(m=-\dfrac{a}{b}\).
| Type of line | Condition or equation | Key feature |
|---|---|---|
| Uphill | \(m>0\) | The line rises from left to right |
| Downhill | \(m<0\) | The line falls from left to right |
| Horizontal | \(a=0\), so \(y=\dfrac{k}{b}\) | Gradient \(=0\) |
| Vertical | \(b=0\), so \(x=\dfrac{k}{a}\) | Gradient is undefined |
A horizontal line has the same \(y\)-coordinate at every point, while a vertical line has the same \(x\)-coordinate at every point.
Need help? Join our JC Math tuition classes.
Learn more