## Linear Algebra and Its Applications, exercise 1.4.11

Exercise 1.4.11. State whether the following statements are true or false. If a given statement is false, provide a counterexample to the statement.

1. For two matrices A and B, if the first column of B is identical to the third column of B then the first column of AB is identical to the third column of AB.
2. If the first row of B is identical to the third row of B then the first row of AB is identical to the third row of AB.
3. If the first row of A is identical to the third row of A then the first row of AB is identical to the third row of AB.
4. The square of AB is equal to the square of A times the square of B.

Answer: Assume that A is an m x n matrix and B is an n x p matrix.

1. Each entry $c_{i1}$ in the first column of AB is formed by taking the inner product of the ith row of A with the first column of B: $c_{i1} = \sum_{k=1}^{k=n} a_{ik}b_{k1}$

Similarly, each entry $c_{i3}$ in the third column of AB is formed by taking the inner product of the ith row of A with the third column of B: $c_{i3} = \sum_{k=1}^{k=n} a_{ik}b_{k3}$

If the first column of B is equal to the third column of B then we have $b_{i1} = b_{i3}$ for all $i = 1, \ldots, n$

We then have $c_{i1} = \sum_{k=1}^{k=n} a_{ik}b_{k1} = \sum_{k=1}^{k=n} a_{ik}b_{k3} = c_{i3} \: \rm for \: i = 1, \ldots, m$

so that the first column of AB is equal to the third column of AB. The statement is therefore true.

2. Each entry $c_{1j}$ in the first row of AB is formed by taking the inner product of the first row of A with the jth column of B: $c_{1j} = \sum_{k=1}^{k=n} a_{1k}b_{kj}$

Similarly, each entry $c_{3j}$ in the third row of AB is formed by taking the inner product of the third row of A with the jth column of B: $c_{3j} = \sum_{k=1}^{k=n} a_{3k}b_{kj}$

If the first and third rows of A are different then their inner products with each of the columns of B are not guaranteed to be equal in the general case, and thus the first and third rows of AB are not guaranteed to be equal in the general case. The statement is therefore false.

By making the first and third rows of B equal (as stated), but the first and third rows of A different, we can construct a suitable counterexample where the first and third rows of AB are different: $AB = \begin{bmatrix} 1&0&0 \\ 0&0&0 \\ 0&0&0 \end{bmatrix} \begin{bmatrix} 1&1&1 \\ 0&0&0 \\ 1&1&1 \end{bmatrix} = \begin{bmatrix} 1&1&1 \\ 0&0&0 \\ 0&0&0 \end{bmatrix}$

3. As stated in the previous item, each entry $c_{1j}$ in the first row of AB is formed by taking the inner product of the first row of A with the jth column of B: $c_{1j} = \sum_{k=1}^{k=n} a_{1k}b_{kj}$

and each entry $c_{3j}$ in the third row of AB is formed by taking the inner product of the third row of A with the jth column of B: $c_{3j} = \sum_{k=1}^{k=n} a_{3k}b_{kj}$

If the first row of A is equal to the third row of A then their inner products with the jth column of B will be the same, and this implies in turn that each entry in the first row of AB will be equal to the corresponding entry in the third row of AB. The atatement is therefore true.

4. We can express the square of AB as follows: $(AB)^2 = (AB)(AB) = A(BA)B$

using the definition of the square of AB and the associativity of matrix multiplication.

Similarly we can express the square of A times the square of B as: $A^2B^2 = (AA)(BB) = A(AB)B$

Since matrix multiplication is not commutative $AB \neq BA$ in the general case, which implies from the equations above that $(AB)^2 \neq A^2B^2$ in the general case. The statement is therefore false.

We can find a counterexample by finding two matrices A and B where $AB \neq BA$. For example, if $A = \begin{bmatrix} 1&1 \\ 0&1 \end{bmatrix} \: \rm and \: B = \begin{bmatrix} 1&0 \\ 1&1 \end{bmatrix}$

we have $AB = \begin{bmatrix} 1&1 \\ 0&1 \end{bmatrix} \begin{bmatrix} 1&0 \\ 1&1 \end{bmatrix} = \begin{bmatrix} 2&1 \\ 1&1 \end{bmatrix} \: \rm and \: BA = \begin{bmatrix} 1&0 \\ 1&1 \end{bmatrix} \begin{bmatrix} 1&1 \\ 0&1 \end{bmatrix} = \begin{bmatrix} 1&1 \\ 1&2 \end{bmatrix}$ $A^2 = \begin{bmatrix} 1&1 \\ 0&1 \end{bmatrix} \begin{bmatrix} 1&1 \\ 0&1 \end{bmatrix} = \begin{bmatrix} 1&2 \\ 0&1 \end{bmatrix} \: \rm and \: B^2 = \begin{bmatrix} 1&0 \\ 1&1 \end{bmatrix} \begin{bmatrix} 1&0 \\ 1&1 \end{bmatrix} = \begin{bmatrix} 1&0 \\ 2&1 \end{bmatrix}$ $A^2B^2 = \begin{bmatrix} 1&2 \\ 0&1 \end{bmatrix}\begin{bmatrix} 1&0 \\ 2&1 \end{bmatrix} = \begin{bmatrix} 5&2 \\ 2&1 \end{bmatrix} \: \rm and \: (AB)^2 = \begin{bmatrix} 2&1 \\ 1&1 \end{bmatrix} \begin{bmatrix} 2&1 \\ 1&1 \end{bmatrix} = \begin{bmatrix} 5&3 \\ 3&2 \end{bmatrix}$

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra. Bookmark the permalink.