[Math] How to find the vector perpendicular to a line and passes through a point

linear algebra

How to find the vector perpendicular to a line that passes through a point that does not lie on that line?

Best Answer

Let $\vec x=\vec a+\lambda\vec u$ be the equation of the line and $\vec p$ be any vector. Then the orthogonal projection of $\vec p-\vec a$ along $\vec u$ is $\dfrac{\langle \vec p-\vec a,\vec u\rangle}{\|u\|^2}\vec u$. Can you finish from here?