Skip to content

Mathematics · Ch 4 — Straight Lines

Various Forms of the Equation of a Line

4.3

Various Forms of the Equation of a Line

The Equation of a Line: A Condition on Points

Every line in a plane contains infinitely many points. The central question is: given a line LL and an arbitrary point P(x,y)P(x, y) in the XYXY-plane, how do we decide whether PP lies on LL? The answer is that we need a condition — an algebraic equation in xx and yy — that is true exactly when PP is on LL, and false otherwise. That equation is what we call the equation of the line.

The form this equation takes depends on what information we have about the line. Different pieces of data — a point and a slope, two points, intercepts, or the angle a perpendicular makes with the axes — lead to different, but equivalent, forms of the same equation. We now examine each of these forms in the order the textbook presents them.


1. Point-Slope Form

Suppose we know one specific point on the line and the slope of the line. Let the fixed point be P0(x0,y0)P_0(x_0, y_0) and let the slope be mm. Take any other point P(x,y)P(x, y) on the line. Since PP and P0P_0 both lie on the same line, the slope calculated from these two points must equal mm:

m=y−y0x−x0m = \frac{y - y_0}{x - x_0}

Multiplying both sides by (x−x0)(x - x_0) gives the point-slope form:

y−y0=m(x−x0)y - y_0 = m(x - x_0)

This is the equation of the line with slope mm passing through (x0,y0)(x_0, y_0).

Watch out

If x=x0x = x_0, the denominator in the slope formula becomes zero. The point-slope form cannot be used for vertical lines (where slope is undefined). Vertical lines have equations of the form x=x0x = x_0.

Example. Find the equation of the line with slope 33 passing through (2,−5)(2, -5).

Here m=3m = 3, x0=2x_0 = 2, y0=−5y_0 = -5. Substituting:

y−(−5)=3(x−2)⇒y+5=3x−6⇒y=3x−11y - (-5) = 3(x - 2) \quad\Rightarrow\quad y + 5 = 3x - 6 \quad\Rightarrow\quad y = 3x - 11


2. Two-Point Form

If we know two distinct points on the line, say P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2), we can first find the slope:

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

Then use the point-slope form with either point. Using P1P_1:

y−y1=y2−y1x2−x1(x−x1)y - y_1 = \frac{y_2 - y_1}{x_2 - x_1}(x - x_1)

This is the two-point form of the equation of a line.

Note

This form is valid only when x1≠x2x_1 \neq x_2 (the line is not vertical). If x1=x2x_1 = x_2, the line is vertical and its equation is simply x=x1x = x_1.

Example. Find the equation of the line through (1,2)(1, 2) and (3,6)(3, 6).

Slope m=6−23−1=42=2m = \frac{6 - 2}{3 - 1} = \frac{4}{2} = 2. Using point-slope with (1,2)(1, 2):

y−2=2(x−1)⇒y=2xy - 2 = 2(x - 1) \quad\Rightarrow\quad y = 2x


3. Slope-Intercept Form

Suppose we know the slope mm of a line and its yy-intercept — the yy-coordinate of the point where the line crosses the yy-axis. Let the yy-intercept be cc, so the line passes through (0,c)(0, c). Using the point-slope form:

y−c=m(x−0)y - c = m(x - 0)

This simplifies to the slope-intercept form:

y=mx+cy = mx + c

Here mm is the slope and cc is the yy-intercept.

Important

The slope-intercept form cannot represent vertical lines (their slope is undefined). For a vertical line, the equation is x=ax = a, where aa is the xx-intercept.

Example. Find the equation of a line with slope −2-2 and yy-intercept 55.

Directly: y=−2x+5y = -2x + 5.


4. Intercept Form

Now suppose we know the xx-intercept and yy-intercept of a line. Let the line cut the xx-axis at A(a,0)A(a, 0) and the yy-axis at B(0,b)B(0, b), where a≠0a \neq 0 and b≠0b \neq 0. Using the two-point form with AA and BB:

y−0=b−00−a(x−a)y - 0 = \frac{b - 0}{0 - a}(x - a)

Simplify:

y=−ba(x−a)⇒y=−bax+by = -\frac{b}{a}(x - a) \quad\Rightarrow\quad y = -\frac{b}{a}x + b

Multiply through by aa:

ay=−bx+ab⇒bx+ay=abay = -bx + ab \quad\Rightarrow\quad bx + ay = ab

Divide both sides by abab:

xa+yb=1\frac{x}{a} + \frac{y}{b} = 1

This is the intercept form of the equation of a line.

Watch out

This form requires both aa and bb to be non-zero. Lines passing through the origin (where both intercepts are zero) or lines parallel to an axis (where one intercept is infinite) cannot be expressed in this form.

Example. Find the equation of a line whose xx-intercept is 44 and yy-intercept is −3-3.

Here a=4a = 4, b=−3b = -3. Substituting:

x4+y−3=1⇒x4−y3=1\frac{x}{4} + \frac{y}{-3} = 1 \quad\Rightarrow\quad \frac{x}{4} - \frac{y}{3} = 1

Multiply by 1212: 3x−4y=123x - 4y = 12.


5. Normal Form

This form uses the perpendicular distance from the origin to the line and the angle that this perpendicular makes with the positive xx-axis.

Let the line LL be at a perpendicular distance pp from the origin (p>0p > 0). Let the perpendicular from the origin to LL meet LL at NN, and let the angle that ONON makes with the positive xx-axis be ω\omega (0≤ω<2π0 \leq \omega < 2\pi).

We need to find the equation of LL in terms of pp and ω\omega.

Consider a point P(x,y)P(x, y) on LL. Draw perpendiculars from PP to the xx-axis and to the line ONON. The coordinates of NN are (pcos⁡ω,psin⁡ω)(p\cos\omega, p\sin\omega).

›Proof

Derivation of the normal form

Let LL be the line, and let ONON be the perpendicular from the origin to LL, with ON=pON = p. The line ONON makes an angle ω\omega with the positive xx-axis, so the coordinates of NN are (pcos⁡ω,psin⁡ω)(p\cos\omega, p\sin\omega).

The slope of ONON is tan⁡ω\tan\omega. Since LL is perpendicular to ONON, the slope of LL is −1tan⁡ω=−cot⁡ω-\frac{1}{\tan\omega} = -\cot\omega, provided tan⁡ω≠0\tan\omega \neq 0.

Using the point-slope form with point N(pcos⁡ω,psin⁡ω)N(p\cos\omega, p\sin\omega):

y−psin⁡ω=−cot⁡ω (x−pcos⁡ω)y - p\sin\omega = -\cot\omega\,(x - p\cos\omega)

y−psin⁡ω=−cos⁡ωsin⁡ω(x−pcos⁡ω)y - p\sin\omega = -\frac{\cos\omega}{\sin\omega}(x - p\cos\omega)

Multiply both sides by sin⁡ω\sin\omega:

ysin⁡ω−psin⁡2ω=−cos⁡ω (x−pcos⁡ω)y\sin\omega - p\sin^2\omega = -\cos\omega\,(x - p\cos\omega)

ysin⁡ω−psin⁡2ω=−xcos⁡ω+pcos⁡2ωy\sin\omega - p\sin^2\omega = -x\cos\omega + p\cos^2\omega

Bring all terms to one side:

xcos⁡ω+ysin⁡ω=p(sin⁡2ω+cos⁡2ω)x\cos\omega + y\sin\omega = p(\sin^2\omega + \cos^2\omega)

Since sin⁡2ω+cos⁡2ω=1\sin^2\omega + \cos^2\omega = 1, we obtain the normal form:

xcos⁡ω+ysin⁡ω=px\cos\omega + y\sin\omega = p

This is the equation of the line in normal form. Here pp is always taken as positive, and ω\omega is the angle that the perpendicular from the origin makes with the positive xx-axis.

Note

The normal form can represent any line that does not pass through the origin. For a line through the origin, p=0p = 0 and the equation becomes xcos⁡ω+ysin⁡ω=0x\cos\omega + y\sin\omega = 0, which is a special case.

Example. Find the equation of a line whose perpendicular distance from the origin is 55 units and the perpendicular makes an angle of 60∘60^\circ with the positive xx-axis.

Here p=5p = 5, ω=60∘\omega = 60^\circ. So cos⁡60∘=12\cos 60^\circ = \frac{1}{2}, sin⁡60∘=32\sin 60^\circ = \frac{\sqrt{3}}{2}. Substituting:

x⋅12+y⋅32=5⇒x2+3y2=5x\cdot\frac{1}{2} + y\cdot\frac{\sqrt{3}}{2} = 5 \quad\Rightarrow\quad \frac{x}{2} + \frac{\sqrt{3}y}{2} = 5

Multiply by 22: x+3y=10x + \sqrt{3}y = 10.

--- …