Finding the intersection of two lines in general dimension Lets say we have two lines in $n$-dimensional space:
$$ f(s) = \vec{n_1}s + \vec{p_1},\\
g(t) = \vec{n_2}t + \vec{p_2};$$
here $\vec{n_1}$, $\vec{n_2}$ are normal vectors, and $\vec{p_1}$, $\vec{p_2}$ are points on each line.
We also know that these lines intersect.
Is there any universal method for finding the intersection of the lines?
 A: We are looking for parameter values $s, t$ such that ${\bf f}(s) = {\bf g}(t)$. Rearranging gives a perfectly good $n \times 2$ linear system
$$s {\bf n}_1 + t {\bf n}_2 = -{\bf p}_1 - {\bf p}_2$$
in $(s, t)$, where $n$ is the dimension of the underlying vector space $\mathbb{V}$, and this can be solved in any of the usual ways.
We can exploit the fact that we know the lines intersect to solve for the intersection point(s) efficiently:
If ${\bf n}_1$ and ${\bf n}_2$ are parallel, then since the lines intersect, they coincide, and hence intersect at all points of each line.
If they are not parallel, then the system has full rank, and so w.r.t. to any basis of $\mathbb{V}$, the matrix $[{\bf n}_1 \,\, {\bf n}_2]$ has an invertible $2 \times 2$ minor, say, the one given by taking the $i$th and $j$th rows. The resulting subsystem, namely
\begin{align}
\begin{pmatrix}
n_{i1} & n_{i2} \\
n_{j1} & n_{j2} \\
\end{pmatrix}
\begin{pmatrix}
s \\
t \\
\end{pmatrix}
=
\begin{pmatrix}
-p_{i1} - p_{i2} \\
-p_{j1} - p_{j2} \\
\end{pmatrix},
\end{align}
has a unique solution $(s, t)$; here $x_{ij}$ denotes the $i$th element of the vector ${\bf x}_j$. Since the lines intersect, that intersection is necessarily given, e.g., by ${\bf f}(s)$.
