How do you calculate the point where two lines in the plane intersect? It is not very hard to do, but the formula can look quite complicated, depending on how you write it up. This article is a reminder that it can be expressed in a simple manner.
We start out by not restricting ourselves to the plane, but any vector space with an inner product⟨⋅,⋅⟩. Let two lines be represented as
(1)
p+sv,s∈R
and
q+tw,t∈R
where p, q, v, and w are vectors. We assume that both v and w are non-null. See Figure 1.
We look for values of s and t such that
(2)
p+sv=q+tw.
Let w^=0 be a vector perpendicular to w, ⟨w,w^⟩=0. We get
(3)
s⟨v,w^⟩=⟨q−p,w^⟩
Now if ⟨v,w^⟩=0 there are two possibilities: If ⟨q−p,w^⟩=0 there are infinitely many solutions, i.e., the lines overlap, but if ⟨q−p,w^⟩=0 there are no solutions, i.e., the lines are parallel and do not intersect.
Assume then ⟨v,w^⟩=0. We get
s=⟨v,w^⟩⟨q−p,w^⟩,
and thus, after inserting into (1), the point of intersection is
p+⟨v,w^⟩⟨q−p,w^⟩v.
The Plane is Special
The derivation above is actually a little careless. If (2) is to hold for some s and t, then (3) must also hold. Turning the implication the other way, which we would like to, is less straightforward.
Assume that (3) holds for some value of s,
(4)
⟨sv+p−q,w^⟩=0.
What does this mean? It means that the vectors sv+p−q and w^ are perpendicular to each other, and if we are in two dimensions/the plane we must have sv+p−q=tw for some value of t. This is (2) and we are done.
Does this work in higher dimensions? Generally, no. Consider, e.g., three dimensions and Equation (4). What can we derive of it now? We have that
sv+p−q=αw1+βw2
for some values of α and β and where ⟨w1,w^⟩=⟨w2,w^⟩=0. And αw1+βw2=tw does not necessarily hold for any t, so (2) does generally not follow in three dimensions or more.