I just watched a YouTube video that used a neat formula, but I don't understand why it works.
Question:
Find the distance between the point $(4,1,-2)$ and the following line $$\begin{cases} x(t) = 1 + t \\ y(t) = 3 - 2t \\ z(t) = 4 - 3t \\ \end{cases}$$
Vector $a = (1,-2,-3)$
When we substitute in the line $t = 0$, we get the point $(1,3,4)$ on the line.
We then subtract the point $(4,1,-2)$ and $(1,3,4)$ to get another vector, lets call it vector $b$.
So, vector $b = (3,-2,-6)$
This is the formula that is confusing to me:
$$d = \frac{|a\times b|}{|a|}$$ where $d$ is the distance
So I understand that $|a\times b|$ evaluates to magnitude of the vector orthogonal to both vector $a$ and vector $b$ and $|a|$ will evaluate to the magnitude of vector $a$
But my question is: why does this formula works? And why must $|a|$ be the denominator instead of $|b|$?

Because $$\frac{|a\times b|}{|b|}=|a|\sin\alpha.$$
Draw it!
Let $B(1,3,4),$ $A(4,1,-2)$, $\vec{BC}=\vec{a}$, $\vec{BA}=\vec{b}$ and $D\in(ABC)$ such that $BD\perp BC$ and $AD\perp BD$.
Also, let $\measuredangle ABC=\alpha$.
Thus, $$BD=|\vec{b}|\sin\alpha=\frac{|\vec{a}\times \vec{b}|}{|\vec{b}|},$$ which is exactly needed distance.