A straight line can be described algebraically in several equivalent ways. Each form is tailored to the information you happen to have — a point and a slope, two points, intercepts, or a perpendicular from the origin. Knowing which form to reach for is half the battle.
Horizontal and vertical lines. Start with the two simplest cases. A horizontal line keeps $y$ constant, so its equation is $y = b$ (and $y = 0$ is the $x$-axis). A vertical line keeps $x$ constant, so its equation is $x = a$ (and $x = 0$ is the $y$-axis). A vertical line has no slope, which is why it cannot be written as $y = mx + c$.
$$\textbf{Horizontal: } y = b \qquad \textbf{Vertical: } x = a$$
Point-slope form. If a line has slope $m$ and passes through a known point $(x_1, y_1)$, every other point $(x, y)$ on it satisfies:
$$y-y_1=m(x-x_1)$$
This is the most fundamental form, because it is just the slope definition rearranged. Nearly every other form can be derived from it.
Two-point form. When two points $(x_1, y_1)$ and $(x_2, y_2)$ are given, compute the slope and substitute:
$$y-y_1=\dfrac{y_2-y_1}{x_2-x_1}(x-x_1)$$
Slope-intercept form. If a line has slope $m$ and cuts the $y$-axis at $(0, c)$, then $c$ is the $y$-intercept and:
$$y=mx+c$$
A close cousin uses the $x$-intercept $d$: a line of slope $m$ crossing the $x$-axis at $(d, 0)$ is $y = m(x - d)$.
Intercept form. If a line cuts the $x$-axis at $(a, 0)$ and the $y$-axis at $(0, b)$, with $a, b \ne 0$:
$$\dfrac{x}{a}+\dfrac{y}{b}=1$$
This form is unbeatable when a problem mentions where a line crosses the axes, or the area of the triangle it cuts off (which is $\tfrac{1}{2}|ab|$).
Normal (perpendicular) form. If the perpendicular from the origin to the line has length $p > 0$ and makes angle $\omega$ with the positive $x$-axis (with $0^\circ \le \omega < 360^\circ$):
$$x\cos\omega+y\sin\omega=p$$
Here $p$ is always taken positive — it is a length — and $\omega$ records the direction of the perpendicular. The table below summarises when each form is most convenient:
Deeper Insight — one line, many disguises: All these forms describe exactly the same kind of object, and any one can be algebraically rearranged into any other — they are disguises of a single linear relationship, not different lines. The point-slope form is the parent: feed it two points and you get the two-point form, set the point on the $y$-axis and you get slope-intercept. The other forms are conveniences that let you skip arithmetic when you already have the right data — reaching for intercept form when you know where a line crosses the axes saves you from solving simultaneous equations. The normal form is the odd one out and the most geometric: it encodes the shortest distance $p$ from the origin and the direction $\omega$ of that shortest path, which is precisely why it leads naturally into the distance formula of the next topic. Fluency here is really fluency in translation — recognising the same line no matter which costume it wears, and choosing the costume that makes the problem trivial.
Find the equation of the line through $(2, 3)$ with slope $4$.
Solution- Use point-slope form $y - y_1 = m(x - x_1)$ with $m = 4$, $(x_1, y_1) = (2, 3)$.
- $y - 3 = 4(x - 2)$.
- Expand: $y - 3 = 4x - 8 \Rightarrow y = 4x - 5$.
Answer: $y = 4x - 5$, or in general form $4x - y - 5 = 0$.
Find the equation of the line passing through $(1, 2)$ and $(3, 8)$.
Solution- Slope $m = \dfrac{8 - 2}{3 - 1} = \dfrac{6}{2} = 3$.
- Two-point (via point-slope): $y - 2 = 3(x - 1)$.
- Expand: $y - 2 = 3x - 3 \Rightarrow y = 3x - 1$.
Answer: $y = 3x - 1$, i.e. $3x - y - 1 = 0$.
A line cuts the $x$-axis at $4$ and the $y$-axis at $-2$. Find its equation.
Solution- Here $a = 4$ and $b = -2$, so use intercept form $\dfrac{x}{a} + \dfrac{y}{b} = 1$.
- $\dfrac{x}{4} + \dfrac{y}{-2} = 1$.
- Multiply through by $4$: $x - 2y = 4$.
Answer: $x - 2y = 4$, i.e. $x - 2y - 4 = 0$.
Find the slope and $y$-intercept of the line $3x + 4y - 12 = 0$.
Solution- Rearrange into slope-intercept form: $4y = -3x + 12$.
- Divide by $4$: $y = -\dfrac{3}{4}x + 3$.
- Compare with $y = mx + c$.
Answer: Slope $m = -\dfrac{3}{4}$ and $y$-intercept $c = 3$.
Write the line $x + y - 4 = 0$ in normal form and state the perpendicular distance from the origin.
Solution- Move the constant: $x + y = 4$. Here $A = 1$, $B = 1$, so $\sqrt{A^2 + B^2} = \sqrt{2}$.
- Divide both sides by $\sqrt{2}$: $\dfrac{x}{\sqrt{2}} + \dfrac{y}{\sqrt{2}} = \dfrac{4}{\sqrt{2}} = 2\sqrt{2}$.
- Compare with $x\cos\omega + y\sin\omega = p$: $\cos\omega = \sin\omega = \dfrac{1}{\sqrt{2}}$, so $\omega = 45^\circ$ and $p = 2\sqrt{2}$.
Answer: Normal form $x\cos 45^\circ + y\sin 45^\circ = 2\sqrt{2}$; distance $p = 2\sqrt{2}$.
Find the equation of the line through $(0, 5)$ parallel to the line $2x - 3y + 7 = 0$.
Solution- Slope of the given line: $-\dfrac{A}{B} = -\dfrac{2}{-3} = \dfrac{2}{3}$.
- A parallel line has the same slope $m = \dfrac{2}{3}$ and passes through $(0, 5)$.
- Slope-intercept form: $y = \dfrac{2}{3}x + 5$.
Answer: $y = \dfrac{2}{3}x + 5$, i.e. $2x - 3y + 15 = 0$.
Find the equation of the horizontal line and the vertical line passing through the point $(-3, 5)$.
Solution- A horizontal line keeps $y$ fixed at the point's $y$-coordinate: $y = 5$.
- A vertical line keeps $x$ fixed at the point's $x$-coordinate: $x = -3$.
Answer: Horizontal: $y = 5$; vertical: $x = -3$.
Find the equation of the line cutting off equal positive intercepts on the axes and passing through $(2, 3)$.
Solution- Equal intercepts means $a = b$, so intercept form gives $\dfrac{x}{a} + \dfrac{y}{a} = 1$, i.e. $x + y = a$.
- The line passes through $(2, 3)$: $2 + 3 = a \Rightarrow a = 5$.
Answer: $x + y = 5$.
The mid-point of the segment a line cuts off between the axes is $(3, 2)$. Find the equation of the line.
Solution- Let the intercepts be $(a, 0)$ and $(0, b)$. The mid-point of the segment is $\left(\dfrac{a}{2}, \dfrac{b}{2}\right)$.
- Set $\dfrac{a}{2} = 3$ and $\dfrac{b}{2} = 2$, so $a = 6$ and $b = 4$.
- Intercept form: $\dfrac{x}{6} + \dfrac{y}{4} = 1$, i.e. $2x + 3y = 12$.
Answer: $\dfrac{x}{6} + \dfrac{y}{4} = 1$, i.e. $2x + 3y = 12$.
Find the equation of the perpendicular from the origin to the line $\sqrt{3}\,x + y = 6$, and the foot's direction; hence write the given line in normal form.
Solution- Write as $\sqrt{3}\,x + y = 6$; here $A = \sqrt{3}$, $B = 1$, so $\sqrt{A^2 + B^2} = \sqrt{3 + 1} = 2$.
- Divide through by $2$: $\dfrac{\sqrt{3}}{2}x + \dfrac{1}{2}y = 3$.
- Compare with $x\cos\omega + y\sin\omega = p$: $\cos\omega = \dfrac{\sqrt{3}}{2}$, $\sin\omega = \dfrac{1}{2}$, so $\omega = 30^\circ$ and $p = 3$.
Answer: Normal form: $x\cos 30^\circ + y\sin 30^\circ = 3$, with $p = 3$ and $\omega = 30^\circ$.
Find the equation of the line through $(-1, 4)$ which makes an angle of $135^\circ$ with the positive $x$-axis.
Solution- Slope $m = \tan 135^\circ = -1$.
- Point-slope form through $(-1, 4)$: $y - 4 = -1\,(x - (-1)) = -(x + 1)$.
- Expand: $y - 4 = -x - 1 \Rightarrow x + y - 3 = 0$.
Answer: $x + y - 3 = 0$, i.e. $y = -x + 3$.
A line passes through $(4, 3)$ and the portion of the line intercepted between the axes is bisected at this point. Find its equation.
Solution- If $(4, 3)$ is the mid-point of the intercepts $(a, 0)$ and $(0, b)$, then $\dfrac{a}{2} = 4$ and $\dfrac{b}{2} = 3$.
- So $a = 8$, $b = 6$.
- Intercept form: $\dfrac{x}{8} + \dfrac{y}{6} = 1 \Rightarrow 3x + 4y = 24$.
Answer: $\dfrac{x}{8} + \dfrac{y}{6} = 1$, i.e. $3x + 4y = 24$.