Projection of one vector onto another I have the following equation for a decision boundary line: $-w_0 = w_1x_1 + w_2x_2$ and I want to prove that the distance from the decision boundary to the origin is $l = \frac{w^Tx}{||w||}$. I am having trouble wrapping my mind around how I can just get the distance from a line to a point. Am I supposed to be averaging the distances of all the points on the line to the point?
 A: The distance of a line to a point (or from a point to a line) is the minimum distance (in your case euclidean distance) of the points in the line from the specific point (here the origin).
In other words, the distance is the length of the perpendicular line from origin to your decision boundary. 
Also, $\frac{w^Tx}{||W||} $ is not the distance from the origin to your line. You might want to re check your calculations. 
As @amd mentioned, $\frac{w^Tx}{||w||}$ is the distance from a point $x$ to the line defined by $w$. Hence replacing $x$ by origin the signed distance should be $\frac{-w_0}{||w||}$.
A: The projection of one vector $\vec{u}$ onto another vector $\vec{v}$ in the same Hilbert space is related to their inner (dot, scalar) product as per the following formula obtained from an easy-to-understand YouTube proof:
$\textrm{proj}_{\vec{v}}(\vec{u}) = \left(\frac{\vec{u}\cdot\vec{v}}{{\left|\vec{v}\right|}^2}\right)\vec{v}$,
where $\left|\cdot\right|$ is the norm induced by the dot (inner, scalar) product, defined as $\left|\vec{x}\right| \equiv \left(\vec{x} \cdot \vec{x}\right)^{1/2}$.
There are many ways to view the dot product (a.k.a. inner product or scalar product) in a geometric way.  For example, MapleSoft's explanation and that of Sangaku maths; these "prove" the concept more effectively than any attempt without pictures.
