3 PROJECTION ON A LINE
3.1. Definition
Consider the line in passing through
and with direction
:
Example 1: A line in ![]() ![]() ![]() |
The projection of a given point on the line is a vector
located on the line, that is closest to
(in Euclidean norm). This corresponds to a simple optimization problem:
This particular problem is part of a general class of optimization problems known as least-squares. It is also a special case of a Euclidean projection on a general set.
3.2. Closed-form expression
Assuming that is normalized, so that
, the objective function of the projection problem reads, after squaring:
Thus, the optimal solution to the projection problem is
and the expression for the projected vector is
The scalar product is the component of
along
.
In the case when is not normalized, the expression is obtained by replacing
with its scaled version
:
3.3. Interpreting the scalar product
We can now interpret the scalar product between two non-zero vectors , by applying the previous derivation to the projection of
on the line
of direction
passing through the origin. If
is normalized (
), then the projection of
on
is
. Its length is
. (See above figure from Example 2.)
In general, the scalar product is simply the component of
along the normalized direction
defined by
.