Parametrization of a plane with an auxiliary vector (source code)

= Parametrization of a plane with an auxiliary vector
{title2=$\mathbf x=k\mathbf p/|\mathbf p|^2+s\mathbf q_\perp+t(\mathbf p\times\mathbf q)$}

Let $\mathbf p\ne0$ and choose an auxiliary <vector> $\mathbf q$ with $\mathbf p\times\mathbf q\ne0$. Its component perpendicular to $\mathbf p$ is $\mathbf q_\perp=\mathbf q-(\mathbf p\cdot\mathbf q)\mathbf p/|\mathbf p|^2$. Then all solutions of the <Cartesian equation of a plane> $\mathbf x\cdot\mathbf p=k$ are
$$
\mathbf x=\frac{k}{|\mathbf p|^2}\mathbf p+s\mathbf q_\perp+t(\mathbf p\times\mathbf q),\qquad s,t\in\mathbb R.
$$
The two free directions are nonzero, perpendicular to each other and perpendicular to $\mathbf p$, so they span its two-dimensional <orthogonal complement>. This proves completeness as well as direct substitution. If $\mathbf p\cdot\mathbf q=0$, then $\mathbf q_\perp=\mathbf q$. If the <dot product> is nonzero, another complete form is $\mathbf x=\alpha\mathbf p+[k-\alpha|\mathbf p|^2]\mathbf q/(\mathbf p\cdot\mathbf q)+\beta(\mathbf p\times\mathbf q)$.