Given a Point $P\in\mathbb{R}^3$ is there a way to compute the foot of a dropped perpendicular to line $l = \vec{a} + x\vec{b}$ with $x\in\mathbb{R}$?
There is one constraint here: I want to compute it with a computer program. Thus, a set of linear equations should be avoided.
My own thoughts so far:
A line has no unique perpendicular in $\mathbb{R}^3$. That's why we can't easily construct a perpendicular from the get-go. But we can construct a helping plane $H$ that's perpendicular to $l$: $H: \left(\vec{r}\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}\right) - d = 0$ with $d = \vec{a}\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}$.
We now could apply the line to this equation: $H: \left(\left(\vec{a} + x\vec{b}\right)\cdot\frac{\vec{b}}{\left\|\vec{b}\right\|}\right) - d = 0$
Here I am completely stuck because I can't come up with a computational solution to solve for $x$.