Dot Product

A 1-d vector can also be seen as a matrix linearly transforms the space into a 1-d space. Here is the relation between the vector and the transformation. The transformation is projecting all the vectors in the space to the line that contains the 1-d vector and scale by the length of the 1-d vector. The computation of the linear transformation is the same as calculating the dot product.