Derive $\mathbf b$ from $\mathbf a = \mathbf b× \mathbf c$ I have an equation:
$$\mathbf a = \mathbf b ×  \mathbf c,$$
where $\mathbf a$ $\mathbf b$ and $\mathbf c$ are 3-vectors.
How could I derive $b$ from the equation and express it in terms of $\mathbf a$ and $\mathbf c$?

Note that

*

*if $\mathbf{c}\cdot\mathbf{a}\neq 0$ then there are no solutions.

*if $\mathbf{c}=\mathbf{0}$, then there are no solutions unless $\mathbf{a}=\mathbf0$, in which case every $\mathbf{b}$ works.

*if $\mathbf{c}\neq\mathbf{0}$, then $\mathbf{p}\times\mathbf{c}=\mathbf{0}$ if and only if $\mathbf{p}$ is a scalar multiple of $\mathbf{c}$.

So if $\mathbf{a},\mathbf{c}\neq\mathbf{0}$ and $\mathbf{c}\cdot\mathbf{a}=0$, the solutions are $\mathbf{b}=\mathbf{b_0}+\lambda\mathbf{c}$, some $\mathbf{b}_0$ such that $\mathbf{b}_0\times\mathbf{c}=\mathbf{a}$.
How could we find such a $\mathbf{b}_0$?  One way is to select it so that $b^2$ is minimized.  That is, $\mathbf{b}_0$ is perpendicular to $\mathbf{c}$.  Since $\mathbf{b}_0$ is perpendicular to $\mathbf{a}$ (from $\mathbf{a}=\mathbf{b}\times\mathbf{c}$), we get $\mathbf{b}_0=\mu\mathbf{c}\times\mathbf{a}$.  To solve for $\mu$, we take scalar triple product
$$
\mathbf{b}\cdot(\mathbf{c}\times\mathbf{a})=\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})=\mathbf{a}\cdot\mathbf{a}=a^2
$$
so
$$
\mu=\frac{a^2}{\lvert\mathbf{c}\times\mathbf{a}\rvert^2}
$$
and so the solutions are $\mathbf{b}=\frac{a^2}{\lvert\mathbf{c}\times\mathbf{a}\rvert^2}(\mathbf{c}\times\mathbf{a})+\lambda\mathbf{c}$ for some scalar $\lambda$.
