- Calculus, Volume 2: Multi-Variable Calculus and Linear Algebra with Applications to Differential Equations and Probability
- Tom M. Apostol
- Second Edition
- 1991
- 978-1-119-49676-2
2.16 Exercises
4. $\quad$ Calculate $AB - BA$ in each case.
$\quad$ (a) $\quad A = \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 1 & 2 & 3 \end{bmatrix},$ $\quad B = \begin{bmatrix} 4 & 1 & 1 \\ -4 & 2 & 0 \\ 1 & 2 & 1 \end{bmatrix};$
$\quad$ (b) $\quad A = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 1 & 2 \\ -1 & 2 & 1 \end{bmatrix},$ $\quad B = \begin{bmatrix} 3 & 1 & -2 \\ 3 & -2 & 4 \\ -3 & 5 & 11 \end{bmatrix}.$
Solution. $\quad$ In Section 13, we saw that if $A = (a_{ij})$ and $B = (b_{ij})$ are two $m \times n$ matrices, then the sum $A + B$ is defined as \begin{align*} A + B &= (a_{ij} + b_{ij}) \end{align*} In Section 15, we saw that if $A$ is any $m \times p$ matrix and $B$ is any $p \times n$ matrix, namely: \begin{align*} A &= (a_{ij})_{i, j = 1}^{m, p} \qquad \text{and} \qquad B = (b_{ij})_{i, j = 1}^{p, n} \end{align*} Then, the product $AB$ is defined to be the $m \times n$ matrix $C = (c_{ij})$ whose $ij$-entry is given by \begin{align*} c_{ij} &= \sum_{k = 1}^p a_{ik}b_{kj} \end{align*} Additionally, we saw in Theorem 2.17 that matrix multiplication is associative and distributive so long as the resulting products are meaningful.
(a) $\quad$ We have \begin{align*} AB - BA &= \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 1 & 2 & 3 \end{bmatrix} \begin{bmatrix} 4 & 1 & 1 \\ -4 & 2 & 0 \\ 1 & 2 & 1 \end{bmatrix} - \begin{bmatrix} 4 & 1 & 1 \\ -4 & 2 & 0 \\ 1 & 2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 2 & 2 \\ 2 & 1 & 2 \\ 1 & 2 & 3 \end{bmatrix} \\ &= \begin{bmatrix} \sum_{k=1}^{p = 3} a_{1k}b_{k1} & \sum_{k=1}^{p=3}a_{1k}b_{k2} & \sum_{k=1}^{p=3} a_{1k}b_{k3} \\ \sum_{k=1}^{p = 3} a_{2k}b_{k1} & \sum_{k=1}^{p=3}a_{2k}b_{k2} & \sum_{k=1}^{p=3} a_{2k}b_{k3} \\ \sum_{k=1}^{p = 3} a_{3k}b_{k1} & \sum_{k=1}^{p=3}a_{3k}b_{k2} & \sum_{k=1}^{p=3} a_{3k}b_{k3} \\ \end{bmatrix} \\ &- \begin{bmatrix} \sum_{k=1}^{p = 3} b_{1k}a_{k1} & \sum_{k=1}^{p=3}b_{1k}a_{k2} & \sum_{k=1}^{p=3} b_{1k}a_{k3} \\ \sum_{k=1}^{p = 3} b_{2k}a_{k1} & \sum_{k=1}^{p=3}b_{2k}a_{k2} & \sum_{k=1}^{p=3} b_{2k}a_{k3} \\ \sum_{k=1}^{p = 3} b_{3k}a_{k1} & \sum_{k=1}^{p=3}b_{3k}a_{k2} & \sum_{k=1}^{p=3} b_{3k}a_{k3} \end{bmatrix} \\ &= \begin{bmatrix} -2 & 9 & 3 \\ 6 & 8 & 4 \\ -1 & 11 & 4 \end{bmatrix} - \begin{bmatrix} 7 & 11 & 13 \\ 0 & -6 & -4 \\ 6 & 6 & 9 \end{bmatrix} \\ &= \begin{bmatrix} -9 & -2 & -10 \\ 6 & 14 & 8 \\ -7 & 5 & -5 \end{bmatrix} \end{align*}
(b) $\quad$ We have \begin{align*} AB - BA &= \begin{bmatrix} 2 & 0 & 0 \\ 1 & 1 & 2 \\ -1 & 2 & 1 \end{bmatrix} \begin{bmatrix} 3 & 1 & -2 \\ 3 & -2 & 4 \\ -3 & 5 & 11 \end{bmatrix} - \begin{bmatrix} 3 & 1 & -2 \\ 3 & -2 & 4 \\ -3 & 5 & 11 \end{bmatrix} \begin{bmatrix} 2 & 0 & 0 \\ 1 & 1 & 2 \\ -1 & 2 & 1 \end{bmatrix} \\ &= \begin{bmatrix} \sum_{k=1}^{p = 3} a_{1k}b_{k1} & \sum_{k=1}^{p=3}a_{1k}b_{k2} & \sum_{k=1}^{p=3} a_{1k}b_{k3} \\ \sum_{k=1}^{p = 3} a_{2k}b_{k1} & \sum_{k=1}^{p=3}a_{2k}b_{k2} & \sum_{k=1}^{p=3} a_{2k}b_{k3} \\ \sum_{k=1}^{p = 3} a_{3k}b_{k1} & \sum_{k=1}^{p=3}a_{3k}b_{k2} & \sum_{k=1}^{p=3} a_{3k}b_{k3} \\ \end{bmatrix} \\ &- \begin{bmatrix} \sum_{k=1}^{p = 3} b_{1k}a_{k1} & \sum_{k=1}^{p=3}b_{1k}a_{k2} & \sum_{k=1}^{p=3} b_{1k}a_{k3} \\ \sum_{k=1}^{p = 3} b_{2k}a_{k1} & \sum_{k=1}^{p=3}b_{2k}a_{k2} & \sum_{k=1}^{p=3} b_{2k}a_{k3} \\ \sum_{k=1}^{p = 3} b_{3k}a_{k1} & \sum_{k=1}^{p=3}b_{3k}a_{k2} & \sum_{k=1}^{p=3} b_{3k}a_{k3} \end{bmatrix} \\ &= \begin{bmatrix} 6 & 2 & -4 \\ 0 & 9 & 24 \\ 0 & 0 & 21 \end{bmatrix} - \begin{bmatrix} 9 & -3 & 0 \\ 0 & 6 & 0 \\ -12 & 27 & 21 \end{bmatrix} \\ &= \begin{bmatrix} -3 & 5 & -4 \\ 0 & 3 & 24 \\ 12 & -27 & 0 \end{bmatrix} \quad \blacksquare \end{align*}