# Dot product – 스칼라 곱

스칼라 곱(scalar product, dot product)은 두 벡터로 스칼라를 계산하는 이항연산이다.
스칼라 곱을 사용하는 모든 유클리드 공간은 내적공간이다.

두 벡터 a = [a1, a2, … , an], b = [b1, b2, … , bn]의 스칼라 곱은 다음과 같다: $\mathbf{a}\cdot \mathbf{b} = a_1b_1 + a_2b_2 + \cdots + a_nb_n = \sum_{i=1}^n a_ib_i$
————————————————————————————————–

The dot product of two vectors (from an orthonormal vector space)
a = [a1, a2, … , an] and b = [b1, b2, … , bn] is by definition: $\mathbf{a}\cdot \mathbf{b} = \sum_{i=1}^n a_ib_i = a_1b_1 + a_2b_2 + \cdots + a_nb_n$

where Σ denotes summation notation.

For example, the dot product of two three-dimensional vectors [1, 3, −5] and [4, −2, −1] is $\begin{bmatrix}1&3&-5\end{bmatrix} \cdot \begin{bmatrix}4&-2&-1\end{bmatrix} = (1)(4) + (3)(-2) + (-5)(-1) = 3.$

Using matrix multiplication and treating the (column) vectors as n×1 matrices,
the dot product can also be written as: $\mathbf{a} \cdot \mathbf{b} = \mathbf{a}^T \mathbf{b} \,$

where aT denotes the transpose of the matrix a.

Using the example from above, this would result in a 1×3 matrix (i.e., vector) multiplied by a 3×1 vector (which, by virtue of the matrix multiplication, results in a 1×1 matrix, i.e., a scalar): $\begin{bmatrix} 1&3&-5 \end{bmatrix}\begin{bmatrix} 4\\-2\\-1 \end{bmatrix} = \begin{bmatrix} 3 \end{bmatrix}.$

————————————————————————————————–
The dot product of two vectors a and b (sometimes called inner product, or, since its result is a scalar, the scalar product) is denoted by a ∙ b and is defined as: $\mathbf{a}\cdot\mathbf{b} =\left\|\mathbf{a}\right\|\left\|\mathbf{b}\right\|\cos\theta$

where ||a|| and ||b|| denote the norm (or length) of a and b, and θ 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 that 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: $\mathbf{a} \cdot \mathbf{b} = \langle a_1, a_2, \dots, a_n \rangle \cdot \langle b_1, b_2, \dots, b_n \rangle = a_1 b_1 + a_2 b_2 + \dots + a_n b_n$

where a and b are vectors of n dimensions; a1, a2, …, an are coordinates of a; and b1, b2, …, bn are coordinates of b.

This operation is often useful in physics; for instance, work is the dot product of force and displacement.

출처: 위키 링크(Dot Product), 위키 링크(Vector)