Plane–plane intersection

Consider the two planes defined by

`vec n_A * (vec r_A - vec r_(0,A)) = 0 qquad and qquad vec n_B * (vec r_B - vec r_(0,B)) = 0`.

They may or may not intersect. In `RR^3`, there are three cases:

coplanar (`oo`)
The two planes are equal. This implies that `vec n_A = kvec n_B`, meaning the normal vectors are scalar multiples of each other. It also implies that `vec n * (vec r_(0,A) - vec r_(0,B)) = 0`, where `vec n` is either of the normal vectors (a vector joining the two initial points is parallel to the plane) . There are `oo` points of intersection.
parallel (0)
The two planes are parallel, so `vec n_A = kvec n_B`, but they are not coplanar. Unlike before, `vec n * (vec r_(0,A) - vec r_(0,B)) != 0`. The planes never intersect.
nonparallel (`oo`)
All other systems fall into this category. The planes are nonparallel, so `vec n_A != kvec n_B`. There is a line of intersection—not just a point.

This case analysis is exactly analogous to the intersection of two lines in two-space. We can also derive the rules for the intersection of three planes from this. First, intersection two of the planes—any two. If they are coplanar, then it is just a two-plane intersection problem (ignore the duplicate). If they have no intersections, neither do the three. And if there is a line of intersection, find the line–plane intersection between this line and the third plane. Expanding this third case into the three line–plane cases leaves use with five cases for the intersection of three planes: all the same, all parallel, two parallel, one shared line, and one shared point.

To find the line of intersection for two nonparallel planes, we need a direction vector and a point. If the planes have normal vectors `vec n_1` and `vec n_2`, then the direction vector of the line is

`vec m = vec n_1 xx vec n_2`.

Next, take the two plane equations and use elimination to produce a third equation with only two variables. Choose a value for one of these (for example, let `x=0`) and solve for the other. Now take both values and plug them into one of the original plane equations to get the third coordinate. The resulting point should satisfy both plane equations; you can now write the equation of the line in vector form.