notes

Log | Files | Refs | README

cross_product.md (7530B)


      1 # Cross Product
      2 
      3 The **cross product** is an operation that takes two vectors in
      4 $$ \mathbb{R}^3 $$
      5 
      6 and returns another vector in $$ \mathbb{R}^3 $$
      7 
      8 , written $\mathbf{a} \times \mathbf{b}$. Unlike the dot product, the result is
      9 a vector, not a scalar. The cross product is only defined in three dimensions
     10 (and in a generalized sense in seven dimensions; here we restrict to
     11 $\mathbb{R}^3$).
     12 
     13 ## Geometric meaning
     14 
     15 - **Direction:** $\mathbf{a} \times \mathbf{b}$ is perpendicular to both
     16   $\mathbf{a}$ and $\mathbf{b}$, following the right-hand rule: if you point
     17   your fingers along $\mathbf{a}$ and curl them toward $\mathbf{b}$, your thumb
     18   points in the direction of $\mathbf{a} \times \mathbf{b}$.
     19 - **Magnitude:** $\|\mathbf{a} \times \mathbf{b}\| =
     20   \|\mathbf{a}\|\,\|\mathbf{b}\|\sin\theta$, where $\theta$ is the angle between
     21   $\mathbf{a}$ and $\mathbf{b}$. So the length equals the area of the
     22   parallelogram spanned by $\mathbf{a}$ and $\mathbf{b}$.
     23 
     24 ## Algebraic definition
     25 
     26 For vectors
     27 
     28 $$
     29 \mathbf{a} =
     30 \begin{pmatrix}
     31 a_1\\
     32 a_2\\
     33 a_3
     34 \end{pmatrix},
     35 \quad
     36 \mathbf{b} =
     37 \begin{pmatrix}
     38 b_1\\
     39 b_2\\
     40 b_3
     41 \end{pmatrix},
     42 $$
     43 
     44 the cross product is
     45 
     46 $$
     47 \mathbf{a} \times \mathbf{b} =
     48 \begin{pmatrix}
     49 a_2 b_3 - a_3 b_2\\
     50 a_3 b_1 - a_1 b_3\\
     51 a_1 b_2 - a_2 b_1
     52 \end{pmatrix}.
     53 $$
     54 
     55 This can be remembered using the determinant of a formal $3\times 3$ matrix:
     56 
     57 $$
     58 
     59 \mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{e}_1 & \mathbf{e}_2 &
     60 \mathbf{e}_3\\ a_1 & a_2 & a_3\\ b_1 & b_2 & b_3 \end{vmatrix}
     61 
     62 $$
     63 
     64 $$
     65 
     66 \mathbf{e}_1(a_2 b_3 - a_3 b_2)
     67 
     68 - \mathbf{e}_2(a_1 b_3 - a_3 b_1)
     69 
     70 * \mathbf{e}_3(a_1 b_2 - a_2 b_1),
     71 
     72 $$
     73 
     74 where $\mathbf{e}_1, \mathbf{e}_2, \mathbf{e}_3$ are the standard unit vectors
     75 in $\mathbb{R}^3$.
     76 
     77 ### The "Cross-Out" Method (Fastest)
     78 
     79 The shorthand calculation for this is:
     80 
     81 1. Stack them: Write the components of the first vector over the second vector
     82    twice.
     83 2. Cross out the first and last columns.
     84 3. Multiply in an 'X' pattern (top-left bot-right minus top-right bot-left) for
     85    each remaining pair:
     86 
     87 <img src="/assets/cross_product_shorthand.png" alt="Cross Product Calculation" width="500">
     88 
     89 ## Rules of calculation (with examples in LaTeX)
     90 
     91 Let $\mathbf{a}, \mathbf{b}, \mathbf{c} \in \mathbb{R}^3$ and $\lambda \in
     92 \mathbb{R}$.
     93 
     94 ---
     95 
     96 **1. Anticommutativity**
     97 
     98 Swapping the order flips the sign:
     99 
    100 $$
    101 \mathbf{a} \times \mathbf{b} = -\bigl(\mathbf{b} \times \mathbf{a}\bigr).
    102 $$
    103 
    104 Example:
    105 
    106 $$
    107 \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix} \times \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix}
    108 = \begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix},
    109 \quad
    110 \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix} \times \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix}
    111 = \begin{pmatrix} 0\\ 0\\ -1 \end{pmatrix}.
    112 $$
    113 
    114 ---
    115 
    116 **2. Distributivity over addition**
    117 
    118 $$
    119 \mathbf{a} \times (\mathbf{b} + \mathbf{c})
    120 = \mathbf{a} \times \mathbf{b} + \mathbf{a} \times \mathbf{c},
    121 \qquad
    122 (\mathbf{a} + \mathbf{b}) \times \mathbf{c}
    123 = \mathbf{a} \times \mathbf{c} + \mathbf{b} \times \mathbf{c}.
    124 $$
    125 
    126 Example (second component of $\mathbf{a} \times (\mathbf{b}+\mathbf{c})$):
    127 
    128 $$
    129 \mathbf{a} = \begin{pmatrix} 1\\ 2\\ 0 \end{pmatrix},\;
    130 \mathbf{b} = \begin{pmatrix} 0\\ 1\\ 1 \end{pmatrix},\;
    131 \mathbf{c} = \begin{pmatrix} 1\\ 0\\ 1 \end{pmatrix}
    132 \;\Rightarrow\;
    133 \mathbf{b}+\mathbf{c} = \begin{pmatrix} 1\\ 1\\ 2 \end{pmatrix}.
    134 $$
    135 
    136 $$
    137 \mathbf{a} \times \mathbf{b} = \begin{pmatrix} 2\\ -1\\ 1 \end{pmatrix},\quad
    138 \mathbf{a} \times \mathbf{c} = \begin{pmatrix} 2\\ -1\\ -2 \end{pmatrix}
    139 \;\Rightarrow\;
    140 \mathbf{a} \times \mathbf{b} + \mathbf{a} \times \mathbf{c} = \begin{pmatrix} 4\\ -2\\ -1 \end{pmatrix}.
    141 $$
    142 
    143 $$
    144 \mathbf{a} \times (\mathbf{b}+\mathbf{c}) = \begin{pmatrix} 2\cdot 2 - 0\cdot 1\\ 0\cdot 1 - 1\cdot 2\\ 1\cdot 1 - 2\cdot 1 \end{pmatrix} = \begin{pmatrix} 4\\ -2\\ -1 \end{pmatrix}.
    145 $$
    146 
    147 ---
    148 
    149 **3. Scalar multiplication (homogeneity)**
    150 
    151 A scalar can be factored out of either slot:
    152 
    153 $$
    154 (\lambda \mathbf{a}) \times \mathbf{b}
    155 = \mathbf{a} \times (\lambda \mathbf{b})
    156 = \lambda (\mathbf{a} \times \mathbf{b}).
    157 $$
    158 
    159 Example: with $\mathbf{a} = \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix}$,
    160 $\mathbf{b} = \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix}$, $\lambda = 3$,
    161 
    162 $$
    163 (3\mathbf{a}) \times \mathbf{b}
    164 = \begin{pmatrix} 3\\ 0\\ 0 \end{pmatrix} \times \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix}
    165 = \begin{pmatrix} 0\\ 0\\ 3 \end{pmatrix}
    166 = 3 \begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix}
    167 = 3(\mathbf{a} \times \mathbf{b}).
    168 $$
    169 
    170 ---
    171 
    172 **4. Cross product with the zero vector**
    173 
    174 $$
    175 \mathbf{a} \times \mathbf{0} = \mathbf{0} \times \mathbf{a} = \mathbf{0}.
    176 $$
    177 
    178 ---
    179 
    180 **5. Parallel vectors**
    181 
    182 $\mathbf{a}$ and $\mathbf{b}$ are parallel (or one is zero) if and only if
    183 
    184 $$
    185 \mathbf{a} \times \mathbf{b} = \mathbf{0}.
    186 $$
    187 
    188 Example: $\mathbf{a} = \begin{pmatrix} 2\\ 4\\ 6 \end{pmatrix}$, $\mathbf{b}
    189 = \begin{pmatrix} 1\\ 2\\ 3 \end{pmatrix} = \tfrac{1}{2}\mathbf{a}$, so
    190 
    191 $$
    192 \mathbf{a} \times \mathbf{b}
    193 = \begin{pmatrix} 4\cdot 3 - 6\cdot 2\\ 6\cdot 1 - 2\cdot 3\\ 2\cdot 2 - 4\cdot 1 \end{pmatrix}
    194 = \begin{pmatrix} 0\\ 0\\ 0 \end{pmatrix}.
    195 $$
    196 
    197 ---
    198 
    199 **6. Self-cross product**
    200 
    201 $$
    202 \mathbf{a} \times \mathbf{a} = \mathbf{0}.
    203 $$
    204 
    205 (Special case of the parallel-vectors rule.)
    206 
    207 ---
    208 
    209 **7. Jacobi identity**
    210 
    211 $$
    212 
    213 \mathbf{a} \times (\mathbf{b} \times \mathbf{c})
    214 
    215 - \mathbf{b} \times (\mathbf{c} \times \mathbf{a})
    216 - \mathbf{c} \times (\mathbf{a} \times \mathbf{b}) = \mathbf{0}.
    217 
    218 $$
    219 
    220 ---
    221 
    222 **8. Relation to dot product (vector triple product expansion)**
    223 
    224 $$
    225 \mathbf{a} \times (\mathbf{b} \times \mathbf{c})
    226 = (\mathbf{a} \cdot \mathbf{c})\mathbf{b} - (\mathbf{a} \cdot \mathbf{b})\mathbf{c}.
    227 $$
    228 
    229 Example: $\mathbf{a} = \mathbf{e}_1$, $\mathbf{b} = \mathbf{e}_2$,
    230 $\mathbf{c} = \mathbf{e}_3$:
    231 
    232 $$
    233 \mathbf{a} \cdot \mathbf{c} = 0,\quad \mathbf{a} \cdot \mathbf{b} = 0
    234 \;\Rightarrow\;
    235 \mathbf{a} \times (\mathbf{b} \times \mathbf{c}) = 0\cdot \mathbf{b} - 0\cdot \mathbf{c} = \mathbf{0}.
    236 $$
    237 
    238 $$
    239 \mathbf{b} \times \mathbf{c} = \mathbf{e}_1
    240 \;\Rightarrow\;
    241 \mathbf{e}_1 \times \mathbf{e}_1 = \mathbf{0}.
    242 $$
    243 
    244 ---
    245 
    246 **9. Magnitude and angle**
    247 
    248 $$
    249 \|\mathbf{a} \times \mathbf{b}\|^2
    250 = \|\mathbf{a}\|^2 \|\mathbf{b}\|^2 - (\mathbf{a} \cdot \mathbf{b})^2.
    251 $$
    252 
    253 Equivalently, $\|\mathbf{a} \times \mathbf{b}\| =
    254 \|\mathbf{a}\|\,\|\mathbf{b}\|\sin\theta$.
    255 
    256 ---
    257 
    258 **10. Relation to the dot product (scalar triple product)**
    259 
    260 $$
    261 \mathbf{a} \cdot (\mathbf{b} \times \mathbf{c})
    262 = \mathbf{b} \cdot (\mathbf{c} \times \mathbf{a})
    263 = \mathbf{c} \cdot (\mathbf{a} \times \mathbf{b}).
    264 $$
    265 
    266 This value is the (signed) volume of the parallelepiped spanned by $\mathbf{a},
    267 \mathbf{b}, \mathbf{c}$. Example:
    268 
    269 $$
    270 \mathbf{a} = \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix},\;
    271 \mathbf{b} = \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix},\;
    272 \mathbf{c} = \begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix}
    273 \;\Rightarrow\;
    274 \mathbf{b} \times \mathbf{c} = \begin{pmatrix} 1\\ 0\\ 0 \end{pmatrix},\quad
    275 \mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) = 1.
    276 $$
    277 
    278 ## Worked example
    279 
    280 Compute $\mathbf{u} \times \mathbf{v}$ for
    281 
    282 $$
    283 \mathbf{u} = \begin{pmatrix} 2\\ -1\\ 3 \end{pmatrix},\qquad
    284 \mathbf{v} = \begin{pmatrix} 1\\ 4\\ -2 \end{pmatrix}.
    285 $$
    286 
    287 $$
    288 \mathbf{u} \times \mathbf{v}
    289 = \begin{pmatrix}
    290 (-1)(-2) - (3)(4)\\
    291 (3)(1) - (2)(-2)\\
    292 (2)(4) - (-1)(1)
    293 \end{pmatrix}
    294 = \begin{pmatrix}
    295 2 - 12\\
    296 3 + 4\\
    297 8 + 1
    298 \end{pmatrix}
    299 = \begin{pmatrix} -10\\ 7\\ 9 \end{pmatrix}.
    300 $$
    301 
    302 Check: $\mathbf{u} \cdot (\mathbf{u} \times \mathbf{v}) = 2(-10) + (-1)(7) +
    303 3(9) = -20 - 7 + 27 = 0$, and $\mathbf{v} \cdot (\mathbf{u} \times \mathbf{v})
    304 = 1(-10) + 4(7) + (-2)(9) = -10 + 28 - 18 = 0$, so the result is perpendicular
    305 to both $\mathbf{u}$ and $\mathbf{v}$.