compute perpedicular vector component

61 Views Asked by At

enter image description here

I have two vectors $a=(a_x, a_y)$, $b=(b_x, b_y)$ . How can I compute the component vector $p$ of vector $a$ perpendicular to vector $b$? (how to compute vector $p$)

4

There are 4 best solutions below

1
On BEST ANSWER

First, find the projection of $a$ onto $\hat b$:

$$a_\parallel = (a \cdot \hat b) \hat b$$

Then, remember that $a = a_\parallel + a_\perp$ to get

$$a_\perp = p = a - (a \cdot \hat b) \hat b$$

0
On

You can find $\cos(a, b)$ by remembering that $(a,b) = ||a||||b|| \cos(a,b)$. Then you can find $\sin(a,b)$ and thus $p$ from the right triangle formed (partially) by $a$ and $p$.

0
On

This is sort of a golden rule but the perpendicular vector of $(a,b)$ is $k(-b,a)$ where $k$ is any scalar.

You can prove this by using the definition of orthogonality $p\cdot b = 0 \Longleftrightarrow p_xb_x + p_yb_y = 0$

If you just want to know a perpendicular vector, I suggest you simply let $k = 1$.

If you want $p$ and $a$ to sort of form a rectangle triangle, you will need to find $k$ but I'm sure you can do that.

0
On

Remember the dot product $u*v = |u||v|\cos{\theta}$ where $\theta$ is the angle between them. If you then remember projection, with $u$ projected onto $v$ being $\frac{v}{|v|} * |u|\cos{\theta}$, you then have the component in the same direction as v. To then get the a component perpendicular to that, you remember that, given that this projection is $proj$, you have $proj + perp = a$ so $perp = a-proj$.