The dot product
The dot product of two vectors x and y of the same length is the matrix product xᵀy: multiply matching entries and add them up. The result is a scalar.
For x = [1, 2, 3]ᵀ and y = [4, 5, 6]ᵀ: xᵀy = 1·4 + 2·5 + 3·6 = 32.
Unlike the matrix product, the dot product is commutative: xᵀy = yᵀx. It can also be written with norms and the angle θ between the vectors, xᵀy = ‖x‖₂ ‖y‖₂ cos θ. So two nonzero vectors whose dot product is 0 meet at 90°: they are orthogonal.