두 벡터 $\mathbf{u} = (u_x, u_y, u_z), \mathbf{v} = (v_x, v_y, v_z)$의 내적은 다음과 같이 정의된다.
$$ \mathbf{u} \cdot \mathbf{v} = {u_x}{v_x} + {u_y}{v_y} + {u_z}{v_z} $$
코사인의 법칙을 이용하면 내적의 기하학적 의미를 찾을 수 있다.
$$ \mathbf{u} \cdot \mathbf{v} = \Vert{}u\Vert{} \Vert{}v\Vert{} \cos \theta $$
$$ \begin{cases} \mathbf{u} \cdot \mathbf{v} > 0, & 0^\circ \leq \theta < 90^\circ \\ \mathbf{u} \cdot \mathbf{v} = 0, & \theta = 90^\circ \\ \mathbf{u} \cdot \mathbf{v} < 0, & 90^\circ < \theta \leq 180^\circ \end{cases} $$
<aside> 💡
예 1.4
$\mathbf{u} = (1, 2, 3)$이고 $\mathbf{v} = (-4, 0, -1)$이라고 할 때, $\mathbf{u}$와 $\mathbf{v}$ 사이의 각도를 구해 보자.
$$ \mathbf{u} \cdot \mathbf{v} = (1, 2, 3) \cdot (-4, 0, -1) = -4 -3 = -7 $$
$$ \Vert{}\mathbf{u}\Vert{} = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{14}, \quad \Vert{}\mathbf{v}\Vert{} = \sqrt{(-4)^2 + 0^2 + (-1)^2} = \sqrt{17} $$
$$ \cos \theta = \frac{\mathbf{u} \cdot \mathbf{v}}{{\Vert{}\mathbf{u}\Vert{}}{\Vert{}\mathbf{v}\Vert{}}} = \frac{-7}{\sqrt{14} \cdot \sqrt{17}} $$
$$ \theta = \cos^{-1} \left(\frac{-7}{\sqrt{14} \cdot \sqrt{17}}\right) $$
</aside>