= Solution
A necessary compatibility condition is $\mathbf f\cdot\hat{\mathbf g}=0$, because a <cross product> with $\hat{\mathbf g}$ is perpendicular to it. If this condition fails, there is no solution.
If it holds, take $\hat{\mathbf g}\times$ the equation and use the <vector triple product identity>:
$$
\hat{\mathbf g}\times\mathbf f
=\hat{\mathbf g}\times(\mathbf r\times\hat{\mathbf g})
=\mathbf r-(\mathbf r\cdot\hat{\mathbf g})\hat{\mathbf g}.
$$
Thus the perpendicular <orthogonal projection> is fixed and the parallel component is free:
$$
\boxed{\mathbf r=\hat{\mathbf g}\times\mathbf f+s\hat{\mathbf g},\quad s\in\mathbb R,
\qquad\text{provided }\mathbf f\cdot\hat{\mathbf g}=0}.
$$
Conversely, $(\hat{\mathbf g}\times\mathbf f)\times\hat{\mathbf g}=\mathbf f$ under the compatibility condition, so every displayed <vector> solves the equation. The solution set is a <straight line>, including the line through the origin when $\mathbf f=0$.
Back to article page