# Essential Math WeblogThoughts on math for games

## 12/29/2004

### Errata: Tensor Product

Filed under: Erratical,Mathematical — Jim @ 10:31 pm

William Brennan points out that on page 84, the equation

$(\mathbf{u}\bullet\mathbf{v})\mathbf{w} = \mathbf{u}(\mathbf{v}\otimes\mathbf{w})$

is not correct. There are two ways to rewrite this. In one the intended order is correct, but is missing the transpose operator to indicate that it’s a row vector:

$(\mathbf{u}\bullet\mathbf{v})\mathbf{w} = \mathbf{u}^T(\mathbf{v}\otimes\mathbf{w})$

Alternatively, you can generate the same result with a column vector by doing:

$(\mathbf{u}\bullet\mathbf{v})\mathbf{w} = (\mathbf{w}\otimes\mathbf{v})\mathbf{u}$

In Chapter 3, we simplify the Rodrigues formula (page 123) and general planar reflections (page 128) by using the tensor product. Since the arguments of the tensor product are the same in these cases, the ordering doesn’t matter. However, the ordering of the arguments needs to be reversed in the shear matrices on page 132, so

$\mathbf{H}_{\hat{\mathbf{n}},\mathbf{s}} = \left[\begin{array}{cc}\mathbf{I}+ \mathbf{s}\otimes\hat{\mathbf{n}} & \mathbf{0} \ \mathbf{0}^T & 1 \end{array}\right]$

and

$\mathbf{H}^{-1}_{\hat{\mathbf{n}},\mathbf{s}} = \left[\begin{array}{cc}\mathbf{I}- \mathbf{s}\otimes\hat{\mathbf{n}} & \mathbf{0} \ \mathbf{0}^T & 1 \end{array}\right]$

Other tensor product arguments may need to be reversed elsewhere in the text, though I can’t find any at this time.