The dot product of two vectors a and b (sometimes called the inner product, or, since its result is a scalar, the scalar product) is denoted by a ∙ b, and is defined as: a ⋅ b = ‖ a ‖ ‖ b ‖ cos θ , {\displaystyle \mathbf {a} \cdot \mathbf {b} =\left\|\mathbf {a} \right\|\left\|\mathbf {b} \right\|\cos \theta ,} where θ is the measure of the angle between a and b (see trigonometric function for an explanation of cosine). Geometrically, this means that a and b are drawn with a common start point, and then the length of a is multiplied with the length of the component of b that points in the same direction as a. The dot product can also be defined as the sum of the products of the components of each vector as a ⋅ b = a 1 b 1 + a 2 b 2 + a 3 b 3 . {\displaystyle \mathbf {a} \cdot \mathbf {b} =a_{1}b_{1}+a_{2}b_{2}+a_{3}b_{3}.}
Dot product는 2가지 방법으로 계산될 수 있다