adjust vector to be orthgonal

53 Views Asked by At

I have vector $A$ and $B$, how do I find a vector $C$ that is orthogonal to $A$ and magnitude of $( B - C )$ is minimized?

1

There are 1 best solutions below

0
On BEST ANSWER

The space of vectors orthogonal to $A$ represents a plane $\Pi$. You want a vector $C$ on the plane so that it is closest to $B$, this means you want an orthogonal projection of $B$ onto $\Pi$. This can be calculated by simply removing the $A$ component of $B$ as follows: $$C = B - \frac{B . A}{A . A} A$$