# How do I find the orthogonal projection of two vectors?

The question perhaps is about projection of some $\vec{b}$ on another $\vec{a}$ in the same vector space. If this projection is vector $\vec{p}$, then set the vector dot product $\vec{a}$ and ($\vec{b}$-$\vec{p}$) equal to 0, because $\vec{a}$ and $\vec{b}$-$\vec{p}$ would be orthogonal.
Since $\vec{p}$ is along $\vec{a}$, it would be some multiple of $\vec{a}$. let it be x
Thus $\vec{a} . \left(\vec{b} - x \vec{a}\right)$=0, x= $\frac{\vec{a} . \vec{b}}{| a | | a |}$
Hence $\vec{p}$= x $\vec{a}$ =$\frac{\vec{a} . \vec{b}}{| a | | a |} \vec{a}$