## Basic Equations of Lines and Planes

### Equation of a Line

An important topic of high school algebra is "the equation of a line." This means an equation in x and y whose solution set is a line in the (x,y) plane.

The most popular form in algebra is the "slope-intercept" form

y = mx + b.

This in effect uses x as a parameter and writes y as a function of x: y = f(x) = mx+b. When x = 0, y = b and the point (0,b) is the intersection of the line with the y-axis.

Thinking of a line as a geometrical object and not the graph of a function, it makes sense to treat x and y more evenhandedly. The general equation for a line (normal form) is

ax + by = c,

with the stipulation that at least one of a or b is nonzero. This can easily be converted to slope-intercept form by solving for y:

y = (-a/b) + c/b,

except for the special case b = 0, when the line is parallel to the y-axis.

If the coefficients on the normal form are multiplied by a nonzero constant, the set of solutions is exactly the same, so, for example, all these equations have the same line as solution.

2x + 3 y = 4
4x + 6y = 8
-x - (3/2) y = -2
(1/2)x + (3/4)y = 1

In general, if k is a nonzero constant, then these are equations for the same line, since they have the same solutions.

ax + by = c
(ka)x + (kb)y = kc.

A popular choice for k, in the case when c is not zero, is k = (1/c). Then the equation becomes

(a/c)x + (b/c)y = 1.

Another useful form of the equation is to divide by |(a,b)|, the square root of a2 + b2. This choice will be explained in the Normal Vector section.

Exercise: If O is on the line, show that the equation becomes ax + by = 0, or y = mx.

Exercise: Find the intersections of this line with the coordinate axes.

Exercise: What is the equation of a line through (0,0) and a point (h,k)?

#### Finding the equation of a line through 2 points in the plane

For any two points P and Q, there is exactly one line PQ through the points. If the coordinates of P and Q are known, then the coefficients a, b, c of an equation for the line can be found by solving a system of linear equations.

Example: For P = (1, 2), Q = (-2, 5), find the equation ax + by = c of line PQ.

Since P is on the line, its coordinates satisfy the equation: a1 + b2 = c, or a + 2b = c.
Since Q is on the line, its coordinates satisfy the equation: a(-2) + b5 = c, or -2 a + 5b = c.

Multiply the first equation by 2 and add to eliminate a from the equation: 4b + 5b = 9b = 2c + c = 3c, so b = (1/3)c. Then substituting into the first equation, a = c - 2b = c - (2/3)c = (1/3)c.

This gives the equation [(1/3)c]x + [(1/3)c}y = c. Why is the c not solved for? Remember that there are an infinite number of equations for the line, each of which is multiple of the other. We can factor out c (or set c = 1 for the same result) and get (1/3)x + (1/3)y =1 as one choice of equation for the line. Another choice might be c = 3: x+y = 3, which has cleared the denominators.

This method always works for any distinct P and Q. There is of course a formula for a, b, c also. This can be found expressed by determinants, or the cross product.

Exercises: Find the equations of these lines. Note the special cases.

Line through (3, 4) and (1, -2).
Line through (3, 4) and (-6, -8).
Line through (3, 4) and (3, 7).

#### Connection with Parametric Form of a Line

Given two points P and Q, the points of line PQ can be written as F(t) = (1-t)P + tQ, for t ranging over all the real numbers. If both P and Q satisfy the same equation ax+by = c, then a computation shows that this is also true for (1-t)P + tQ, for any choice of t.

Here is this computation. Let P = (p1, p2), Q = (q1, q2). Then since the points are on the line, we know that both

ap1 + bp2 = c
aq1 + bq2 = c.

For the point F(t), we must check a[(1-t)p1+tq1] + b[(1-t)p2+tq2] = c. But the left side can be rearranged as (1-t)(ap1 + bp2) + t(aq1 + bq2), and this equals (1-t)c + tc = c. So the equation holds. Compare this explicit computation with the computation given for the plane that uses dot product. The computations are the same, but one shows more detail and one hides the coordinates and shows a more conceptual picture.

### Equation of a Plane

A plane in 3-space has the equation

ax + by + cz = d,

where at least one of the numbers a, b, c must be nonzero.

As for the line, if the equation is multiplied by any nonzero constant k to get the equation kax + kby + kcz = kd, the plane of solutions is the same.

If c is not zero, it is often useful to think of the plane as the graph of a function z of x and y. The equation can be rearranged like this:

z = -(a/c)x + (-b/c) y + d/c

Another useful choice, when d is not zero, is to divide by d so that the constant term = 1.

(a/d)x + (b/d)y + (c/d)z = 1.

Another useful form of the equation is to divide by |(a,b,c)|, the square root of a2 + b2 + c2. This choice will be explained in the Normal Vector section.

Exercise: Where does the plane ax + by + cz = d intersect the coordinate axes?

Exercise: What is special about the equation of a plane that passes through 0.

#### Finding the equation of a plane through 3 points in space

Given points P, Q, R in space, find the equation of the plane through the 3 points.

Example: P = (1, 1, 1), Q = (1, 2, 0), R = (-1, 2, 1). We seek the coefficients of an equation ax + by + cz = d, where P, Q and R satisfy the equations, thus:

a + b + c = d
a + 2b + 0c = d
-a + 2b + c = d

Subtracting the first equation from the second and then adding the first equation to the third, we eliminate a to get

b - c = 0
4b + c = 2d

Adding the equations gives 5b = 2d, or b = (2/5)d, then solving for c = b = (2/5)d and then a = d - b - c = (1/5)d.

So the equation (with a nonzero constant left in to choose) is d(1/5)x + d(2/5)y + d(2/5)z = d, so one choice of constant gives

x + 2y + 2z = 5

or another choice would be (1/5)x + (2/5)y + (2/5)z = 1

Given the coordinates of P, Q, R, there is a formula for the coefficients of the plane that uses determinants or cross product.

Exercise. What is equation of the plane through the points I, J, K?

Exercise: What is the equation of the plane through (1, 1, 1), (-1, 1, -1), and (1, -1, -1)?

Exercise: Compare this method of finding the equation of a plane with the cross-product method.

#### Connection with Parametric Form of a Plane

For 3 points P, Q, R, the points of the plane can all be written in the parametric form F(s,t) = (1 - s - t)P + sQ + tR, where s and t range over all real numbers.

A computation like the one above for the equation of a line shows that if P, Q, R all satisfy the same equation ax + by + cz = d, then all the points F(s,t) also satisfy the same equation.

This is the key to seeing that an equation ax + by + cz = d is really the equation of a plane (when at least one of a, b, c is not zero.

This computation will not be done here, since it can be done much more simply using dot product.

Back to Vector-Coordinate Index