Question

How to find the component of a vector perpendicular to another vector

Original question: Given that $a=\begin{pmatrix}3\\-2\end{pmatrix}$ $b=\begin{pmatrix}1\\2\end{pmatrix}$ Find the vector projection of $a$ perpendicular to $b$ Let $a=\begin{pmatrix}3\\-2\end{pmatrix}$ $b=\begin{pmatrix}1\\2\end{pmatrix}$ $\mathrm{proj}_b\,a=\left(\frac{a\cdot b}{|b|^2}\right)b$ $|b|=\sqrt{1^2+2^2}=\sqrt{5}$ $\hat b=\frac{b}{|b|}=\frac{1}{\sqrt{5}}\begin{pmatrix}1\\2\end{pmatrix}$ $\begin{pmatrix}3\\-2\end{pmatrix}^T\cdot \begin{pmatrix}\frac{1}{\sqrt{5}}\\\frac{2}{\sqrt{5}}\end{pmatrix}$ $=\left(3\frac{1}{\sqrt{5}}-2\frac{2}{\sqrt{5}}\right)\begin{pmatrix}\frac{1}{\sqrt{5}}\\\frac{2}{\sqrt{5}}\end{pmatrix}$ $=\frac{3-4}{\sqrt{5}}\begin{pmatrix}\frac{1}{\sqrt{5}}\\\frac{2}{\sqrt{5}}\end{pmatrix}$ $=\frac{-1}{\sqrt{5}}\begin{pmatrix}\frac{1}{\sqrt{5}}\\\frac{2}{\sqrt{5}}\end{pmatrix}$ $=\begin{pmatrix}-\frac{1}{5}\\-\frac{2}{5}\end{pmatrix}$ $a-(a\cdot b)\hat b$ $=(3,-2)-\left(\frac{-1}{\sqrt{5}}\right)\left(\frac{1}{\sqrt{5}},\frac{2}{\sqrt{5}}\right)$ $=\begin{pmatrix}3\\-2\end{pmatrix}-\begin{pmatrix}-\frac{1}{5}\\-\frac{2}{5}\end{pmatrix}$ $=\begin{pmatrix}\frac{16}{5}\\-\frac{8}{5}\end{pmatrix}$ for perpendicular vector projections where did the a- in the formula come from

Expert Verified Solution

thumb_up100%(1 rated)

Expert intro: When a vector is split into parts relative to another vector, one part lies along the direction of that vector and the other part is perpendicular to it. That second piece is what you're looking for here.

Detailed walkthrough

Let

a=(32),b=(12).a=\begin{pmatrix}3\\-2\end{pmatrix},\qquad b=\begin{pmatrix}1\\2\end{pmatrix}.

A clean way to think about this is:

  • parallel component of aa to bb: projba\operatorname{proj}_b a
  • perpendicular component of aa to bb: aprojbaa-\operatorname{proj}_b a

So the formula with the subtraction comes from the fact that you are removing the part of aa that points along bb.

Step 1: Find the projection of aa onto bb

projba=(abbb)b\operatorname{proj}_b a=\left(\frac{a\cdot b}{b\cdot b}\right)b

First compute the dot product:

ab=3(1)+(2)(2)=34=1.a\cdot b=3(1)+(-2)(2)=3-4=-1.

And

bb=12+22=5.b\cdot b=1^2+2^2=5.

So

=\begin{pmatrix}-\frac15\\-\frac25\end{pmatrix}.$$ ### Step 2: Subtract that from $a$ $$a-\operatorname{proj}_b a =\begin{pmatrix}3\\-2\end{pmatrix}-\begin{pmatrix}-\frac15\\-\frac25\end{pmatrix} =\begin{pmatrix}\frac{16}{5}\\-\frac{8}{5}\end{pmatrix}.$$ ### Answer The vector component of $a$ perpendicular to $b$ is $$\boxed{\begin{pmatrix}\frac{16}{5}\\-\frac{8}{5}\end{pmatrix}}.$$ If you saw a formula written like $a-(a\cdot b)\hat b$, the missing scaling factor is the normalization by $|b|^2$ or by $|b|$ depending on how the unit vector is written. The safe version to remember is: $$a_{\perp}=a-\operatorname{proj}_b a.$$ ### 💡 Pitfall guide A common slip is to subtract the whole vector $b$ instead of the projection of $a$ onto $b$. Another one is mixing up the projection formula: if you use the unit vector $\hat b$, then the projection is $(a\cdot \hat b)\hat b$, not just $(a\cdot b)\hat b$. The length of $b$ matters. ### 🔄 Real-world variant If the question instead asks for the component **parallel** to $b$, use $$\operatorname{proj}_b a=\begin{pmatrix}-\frac15\\-\frac25\end{pmatrix}.$$ If it asks for the **scalar** component of $a$ in the direction of $b$, that is $$\frac{a\cdot b}{|b|}=\frac{-1}{\sqrt5}.$$ ### 🔍 Related terms vector projection, orthogonal component, dot product

FAQ

How do I find the part of a vector perpendicular to another vector?

Compute the projection onto the given vector, then subtract it from the original vector: a_perp = a - proj_b(a).

Why is there a subtraction in the formula?

The subtraction removes the component of the vector that lies along the other vector, leaving only the perpendicular part.

chat