Vectors and Matrices
Dot Product
Compute the dot product of two 3-component vectors by multiplying corresponding components and accumulating a running sum. Each term contributes one product; the running sum grows after every step. The final sum is the scalar dot product.
Example
dot product
The dot product u · v = u[1]v[1] + u[2]v[2] + ... + u[n]v[n] is a scalar that measures the alignment of two vectors. It is zero when the vectors are perpendicular.