Every straight line in the coordinate plane can be described by a linear equation in x and y, 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
where A, B, C are real constants and A and B 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)) represents a line.
Special cases:
B=0: the equation Ax+C=0 gives x=−C/A, a vertical line.
A=0: the equation By+C=0 gives y=−C/B, a horizontal line.
C=0: the line passes through the origin.
Intercept Form
If a line intersects the x-axis at (a,0) and the y-axis at (0,b) (with a=0 and b=0), then it can be written in intercept form:
ax+by=1
Derivation. The line passes through (a,0) and (0,b). Check: substituting (a,0) gives aa+0=1✓; substituting (0,b) gives 0+bb=1✓. Expanding: bx+ay=ab, i.e., bx+ay−ab=0, which is the general form with A=b, B=a, C=−ab.
Parallel and Coincident Lines
Two lines A1x+B1y+C1=0 and A2x+B2y+C2=0 are:
Parallel (distinct) if A2A1=B2B1=C2C1
Coincident (the same line) if A2A1=B2B1=C2C1
Intersecting otherwise (the ratios A1:A2 and B1:B2 are not equal)
Informally: parallel lines have the same “direction” (same ratio A:B) but different C.
Distance from a Point to a Line
⚡Theorem — Point-to-Line Distance (Theorem 11.1)
The distance from point P(x0,y0) to the line ℓ:Ax+By+C=0 is:
d=A2+B2∣Ax0+By0+C∣
Proof sketch. Let Q be the foot of the perpendicular from P to ℓ. The line through P perpendicular to ℓ has direction vector (A,B) (the normal to ℓ), so its parametric form is x=x0+At, y=y0+Bt. Substituting into Ax+By+C=0:
Are the lines 2x−4y+7=0 and x−2y+1=0 parallel? If so, find the distance between them.
Solution. Multiply the second equation by 2: 2x−4y+2=0. Comparing with 2x−4y+7=0: the ratios of A and B coefficients are equal (22=−4−4=1), but 27=1. The lines are parallel.
Using A=2, B=−4, C1=7, C2=2:
d=22+(−4)2∣7−2∣=205=255=25
Answer: The lines are parallel, distance =25. ◀
✎Example — Example 3 — Writing the General Equation
A line passes through A(2,1) and is perpendicular to the line 3x−y+5=0. Write its general equation.
Solution. The given line has normal vector (3,−1), so its direction vector is (1,3). A perpendicular line has direction vector (3,−1) (or equivalently, normal vector (1,3)). The perpendicular line through A(2,1) has general equation:
1⋅(x−2)+3⋅(y−1)=0⟹x+3y−5=0
Answer:x+3y−5=0. ◀
Exercises
✏Exercise
Find the distance from each point to the given line.
P(0,0) to the line 5x+12y−26=0
P(1,2) to the line x−y+3=0
P(−1,4) to the line 3x+4y−12=0
✏Exercise
For each pair of lines, determine whether they are parallel, coincident, or intersecting. If parallel, find the distance between them.
2x+y−3=0 and 4x+2y+5=0
x−3y+6=0 and 2x+y−1=0
3x−6y+9=0 and x−2y+3=0
✏Exercise
Write the general equation of the line that:
Passes through A(1,3) with x-intercept −2 (i.e., passes through (−2,0))
Has x-intercept 4 and y-intercept −3 (use intercept form, then convert)
Passes through B(0,5) and is parallel to 2x−3y+1=0