Every point on a horizontal line has the same \(y\)-coordinate. If that coordinate is \(c\), the equation of the line is \(y=c\) and its gradient is \(0\). Every point on a vertical line has the same \(x\)-coordinate. If that coordinate is \(a\), the equation of the line is \(x=a\) and its gradient is undefined.
Along \(y=2\) the \(y\)-coordinate never changes, so the vertical change between any two points is \(0\) and the gradient is \(0\).
Along \(x=3\) the horizontal change is \(0\). The gradient would need a division by \(0\), so it is undefined and \(x=3\) cannot be written as \(y=mx+c\).
Why the equation is so short: an equation tells you which points lie on the line. On the line \(y=2\), a point lies on it whenever its \(y\)-coordinate is \(2\), whatever its \(x\)-coordinate is, so no \(x\) term is needed. This is \(y=mx+c\) with \(m=0\).
Method
Example
The points \(P(-4,6)\) and \(Q(3,6)\) both have \(y\)-coordinate \(6\), so the line \(PQ\) is \(y=6\). Its gradient is \(0\).
The line through \(R(2,-5)\) parallel to the \(y\)-axis is vertical, so it is \(x=2\). Its gradient is undefined.
The lines \(y=6\) and \(x=2\) meet at \((2,6)\).
Check: read the equation as a sentence about coordinates. \(x=2\) means “every point has \(x\)-coordinate \(2\)”, which is a vertical line, even though the equation contains the letter \(x\). A common error is to draw \(x=2\) as a horizontal line.
Create a free account to practise similar questions.
Need help? Join our E-Maths tuition for O-Level success.
Learn more