ironfern @ docs ~/geometry/grade-9/coordinates/general-line-equation $

General Equation of a Line

Every straight line in the coordinate plane can be described by a linear equation in xx and yy, and conversely every such equation describes a line. This fact makes linear equations the primary algebraic tool for working with lines.

General Form

📐Definition — General Equation of a Line

An equation of the form

Ax+By+C=0\boxed{Ax + By + C = 0}

where AA, BB, CC are real constants and AA and BB are not both zero, is called the general equation of a line.

Every line in the plane has an equation of this form, and every equation of this form (with (A,B)(0,0)(A, B) \neq (0, 0)) represents a line.

Special cases:

  • B=0B = 0: the equation Ax+C=0Ax + C = 0 gives x=C/Ax = -C/A, a vertical line.
  • A=0A = 0: the equation By+C=0By + C = 0 gives y=C/By = -C/B, a horizontal line.
  • C=0C = 0: the line passes through the origin.

Intercept Form

If a line intersects the xx-axis at (a,0)(a, 0) and the yy-axis at (0,b)(0, b) (with a0a \neq 0 and b0b \neq 0), then it can be written in intercept form:

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

Derivation. The line passes through (a,0)(a, 0) and (0,b)(0, b). Check: substituting (a,0)(a,0) gives aa+0=1\frac{a}{a} + 0 = 1 \checkmark; substituting (0,b)(0,b) gives 0+bb=10 + \frac{b}{b} = 1 \checkmark. Expanding: bx+ay=abbx + ay = ab, i.e., bx+ayab=0bx + ay - ab = 0, which is the general form with A=bA = b, B=aB = a, C=abC = -ab.

Parallel and Coincident Lines

Two lines A1x+B1y+C1=0A_1 x + B_1 y + C_1 = 0 and A2x+B2y+C2=0A_2 x + B_2 y + C_2 = 0 are:

  • Parallel (distinct) if A1A2=B1B2C1C2\dfrac{A_1}{A_2} = \dfrac{B_1}{B_2} \neq \dfrac{C_1}{C_2}
  • Coincident (the same line) if A1A2=B1B2=C1C2\dfrac{A_1}{A_2} = \dfrac{B_1}{B_2} = \dfrac{C_1}{C_2}
  • Intersecting otherwise (the ratios A1:A2A_1:A_2 and B1:B2B_1:B_2 are not equal)

Informally: parallel lines have the same “direction” (same ratio A:BA:B) but different CC.

Distance from a Point to a Line

Theorem — Point-to-Line Distance (Theorem 11.1)

The distance from point P(x0,y0)P(x_0, y_0) to the line :Ax+By+C=0\ell: Ax + By + C = 0 is:

d=Ax0+By0+CA2+B2\boxed{d = \dfrac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}}

Proof sketch. Let QQ be the foot of the perpendicular from PP to \ell. The line through PP perpendicular to \ell has direction vector (A,B)(A, B) (the normal to \ell), so its parametric form is x=x0+Atx = x_0 + At, y=y0+Bty = y_0 + Bt. Substituting into Ax+By+C=0Ax + By + C = 0:

A(x0+At)+B(y0+Bt)+C=0A(x_0 + At) + B(y_0 + Bt) + C = 0 Ax0+By0+C+(A2+B2)t=0Ax_0 + By_0 + C + (A^2 + B^2)t = 0 t=Ax0+By0+CA2+B2t = -\frac{Ax_0 + By_0 + C}{A^2 + B^2}

The distance PQ|PQ| equals tA2+B2|t| \cdot \sqrt{A^2 + B^2}:

d=tA2+B2=Ax0+By0+CA2+B2A2+B2=Ax0+By0+CA2+B2d = |t| \sqrt{A^2 + B^2} = \frac{|Ax_0 + By_0 + C|}{A^2 + B^2} \cdot \sqrt{A^2 + B^2} = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}} \qquad \blacktriangleleft

Distance Between Parallel Lines

For two parallel lines 1:Ax+By+C1=0\ell_1: Ax + By + C_1 = 0 and 2:Ax+By+C2=0\ell_2: Ax + By + C_2 = 0 (same AA and BB), the distance between them is:

d(1,2)=C1C2A2+B2d(\ell_1, \ell_2) = \frac{|C_1 - C_2|}{\sqrt{A^2 + B^2}}

This follows by picking any point on 1\ell_1 and computing its distance to 2\ell_2.

Worked Examples

Example — Example 1 — Distance from Point to Line

Find the distance from the point P(3,1)P(3, -1) to the line 4x3y+2=04x - 3y + 2 = 0.

Solution. Here A=4A = 4, B=3B = -3, C=2C = 2, x0=3x_0 = 3, y0=1y_0 = -1:

d=43+(3)(1)+242+(3)2=12+3+216+9=1725=175d = \frac{|4 \cdot 3 + (-3) \cdot (-1) + 2|}{\sqrt{4^2 + (-3)^2}} = \frac{|12 + 3 + 2|}{\sqrt{16 + 9}} = \frac{17}{\sqrt{25}} = \frac{17}{5}

Answer: d=175=3.4d = \dfrac{17}{5} = 3.4. \blacktriangleleft

Example — Example 2 — Parallel Lines

Are the lines 2x4y+7=02x - 4y + 7 = 0 and x2y+1=0x - 2y + 1 = 0 parallel? If so, find the distance between them.

Solution. Multiply the second equation by 2: 2x4y+2=02x - 4y + 2 = 0. Comparing with 2x4y+7=02x - 4y + 7 = 0: the ratios of AA and BB coefficients are equal (22=44=1\frac{2}{2} = \frac{-4}{-4} = 1), but 721\frac{7}{2} \neq 1. The lines are parallel.

Using A=2A = 2, B=4B = -4, C1=7C_1 = 7, C2=2C_2 = 2:

d=7222+(4)2=520=525=52d = \frac{|7 - 2|}{\sqrt{2^2 + (-4)^2}} = \frac{5}{\sqrt{20}} = \frac{5}{2\sqrt{5}} = \frac{\sqrt{5}}{2}

Answer: The lines are parallel, distance =52= \dfrac{\sqrt{5}}{2}. \blacktriangleleft

Example — Example 3 — Writing the General Equation

A line passes through A(2,1)A(2, 1) and is perpendicular to the line 3xy+5=03x - y + 5 = 0. Write its general equation.

Solution. The given line has normal vector (3,1)(3, -1), so its direction vector is (1,3)(1, 3). A perpendicular line has direction vector (3,1)(3, -1) (or equivalently, normal vector (1,3)(1, 3)). The perpendicular line through A(2,1)A(2,1) has general equation:

1(x2)+3(y1)=0    x+3y5=01 \cdot (x - 2) + 3 \cdot (y - 1) = 0 \implies x + 3y - 5 = 0

Answer: x+3y5=0x + 3y - 5 = 0. \blacktriangleleft

Exercises

Exercise

Find the distance from each point to the given line.

  1. P(0,0)P(0, 0) to the line 5x+12y26=05x + 12y - 26 = 0
  2. P(1,2)P(1, 2) to the line xy+3=0x - y + 3 = 0
  3. P(1,4)P(-1, 4) to the line 3x+4y12=03x + 4y - 12 = 0
Exercise

For each pair of lines, determine whether they are parallel, coincident, or intersecting. If parallel, find the distance between them.

  1. 2x+y3=02x + y - 3 = 0 and 4x+2y+5=04x + 2y + 5 = 0
  2. x3y+6=0x - 3y + 6 = 0 and 2x+y1=02x + y - 1 = 0
  3. 3x6y+9=03x - 6y + 9 = 0 and x2y+3=0x - 2y + 3 = 0
Exercise

Write the general equation of the line that:

  1. Passes through A(1,3)A(1, 3) with xx-intercept 2-2 (i.e., passes through (2,0)(-2, 0))
  2. Has xx-intercept 44 and yy-intercept 3-3 (use intercept form, then convert)
  3. Passes through B(0,5)B(0, 5) and is parallel to 2x3y+1=02x - 3y + 1 = 0