In this section, we will delve into two fundamental operations involving vectors in 3D space: the dot product and the cross product. These operations are essential for various applications in 3D graphics, physics simulations, and more.

Dot Product

Definition

The dot product (also known as the scalar product) of two vectors \(\mathbf{a}\) and \(\mathbf{b}\) is a scalar value that is calculated as follows:

\[ \mathbf{a} \cdot \mathbf{b} = a_x b_x + a_y b_y + a_z b_z \]

Properties

  • Commutative: \(\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}\)
  • Distributive: \(\mathbf{a} \cdot (\mathbf{b} + \mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}\)
  • Scalar Multiplication: \((k\mathbf{a}) \cdot \mathbf{b} = k(\mathbf{a} \cdot \mathbf{b})\)

Geometric Interpretation

The dot product can also be expressed in terms of the magnitudes of the vectors and the cosine of the angle \(\theta\) between them:

\[ \mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos(\theta) \]

Example

Given two vectors \(\mathbf{a} = \begin{pmatrix} 1 \ 2 \ 3 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 4 \ -5 \ 6 \end{pmatrix}\), calculate the dot product.

\[ \mathbf{a} \cdot \mathbf{b} = 1 \cdot 4 + 2 \cdot (-5) + 3 \cdot 6 = 4 - 10 + 18 = 12 \]

Practical Exercise

Calculate the dot product of the following vectors: \(\mathbf{c} = \begin{pmatrix} 2 \ 3 \ 4 \end{pmatrix}\) and \(\mathbf{d} = \begin{pmatrix} -1 \ 0 \ 5 \end{pmatrix}\).

Solution: \[ \mathbf{c} \cdot \mathbf{d} = 2 \cdot (-1) + 3 \cdot 0 + 4 \cdot 5 = -2 + 0 + 20 = 18 \]

Cross Product

Definition

The cross product (also known as the vector product) of two vectors \(\mathbf{a}\) and \(\mathbf{b}\) is a vector that is perpendicular to both \(\mathbf{a}\) and \(\mathbf{b}\) and is calculated as follows:

\[ \mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k}
a_x & a_y & a_z
b_x & b_y & b_z \end{vmatrix} \]

This can be expanded to:

\[ \mathbf{a} \times \mathbf{b} = \begin{pmatrix} a_y b_z - a_z b_y
a_z b_x - a_x b_z
a_x b_y - a_y b_x \end{pmatrix} \]

Properties

  • Anticommutative: \(\mathbf{a} \times \mathbf{b} = -(\mathbf{b} \times \mathbf{a})\)
  • Distributive: \(\mathbf{a} \times (\mathbf{b} + \mathbf{c}) = \mathbf{a} \times \mathbf{b} + \mathbf{a} \times \mathbf{c}\)
  • Scalar Multiplication: \((k\mathbf{a}) \times \mathbf{b} = k(\mathbf{a} \times \mathbf{b})\)

Geometric Interpretation

The magnitude of the cross product is given by:

\[ |\mathbf{a} \times \mathbf{b}| = |\mathbf{a}| |\mathbf{b}| \sin(\theta) \]

where \(\theta\) is the angle between \(\mathbf{a}\) and \(\mathbf{b}\).

Example

Given two vectors \(\mathbf{a} = \begin{pmatrix} 1 \ 2 \ 3 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 4 \ -5 \ 6 \end{pmatrix}\), calculate the cross product.

\[ \mathbf{a} \times \mathbf{b} = \begin{pmatrix} 2 \cdot 6 - 3 \cdot (-5)
3 \cdot 4 - 1 \cdot 6
1 \cdot (-5) - 2 \cdot 4 \end{pmatrix} = \begin{pmatrix} 12 + 15
12 - 6
-5 - 8 \end{pmatrix} = \begin{pmatrix} 27
6
-13 \end{pmatrix} \]

Practical Exercise

Calculate the cross product of the following vectors: \(\mathbf{c} = \begin{pmatrix} 2 \ 3 \ 4 \end{pmatrix}\) and \(\mathbf{d} = \begin{pmatrix} -1 \ 0 \ 5 \end{pmatrix}\).

Solution: \[ \mathbf{c} \times \mathbf{d} = \begin{pmatrix} 3 \cdot 5 - 4 \cdot 0
4 \cdot (-1) - 2 \cdot 5
2 \cdot 0 - 3 \cdot (-1) \end{pmatrix} = \begin{pmatrix} 15
-4 - 10
0 + 3 \end{pmatrix} = \begin{pmatrix} 15
-14
3 \end{pmatrix} \]

Summary

  • The dot product of two vectors results in a scalar and is useful for determining the angle between vectors and their alignment.
  • The cross product of two vectors results in another vector that is perpendicular to the plane formed by the original vectors and is useful for finding normals to surfaces.

Understanding these operations is crucial for manipulating and interpreting 3D graphics, as they form the basis for many higher-level concepts and applications in 3D space.

© Copyright 2024. All rights reserved