Linear Algebra and Its Applications, Exercise 2.6.18

Exercise 2.6.18. Given a vector \begin{bmatrix} x_1&x_2&x_3 \end{bmatrix}^T in \mathbb{R}^3 find a matrix A that produces a corresponding vector \begin{bmatrix} 0&x_1&x_2&x_3 \end{bmatrix}^T in \mathbb{R}^4 in which all entries are shifted right one place. Find a second matrix B that takes a  vector \begin{bmatrix} x_1&x_2&x_3&x_4 \end{bmatrix}^T in \mathbb{R}^4 and produces the vector \begin{bmatrix} x_2&x_3&x_4 \end{bmatrix}^T in \mathbb{R}^3 in which all entries are shifted left one place. What are the product matrices AB and BA and what effects do they have?

Answer: We can construct A by considering its effect on the elementary vectors in \mathbb{R}^3

e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} \qquad e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \qquad e_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}

Applying A to each of e_1 through e_3 respectively will shift each of their entries to the right (or down, depending on your point of view) and produce the following vectors in \mathbb{R}^4:

\begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} \qquad \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} \qquad \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}

As discussed in the answer to exercise 2.6.16, we can do this by having each column of A be the vector into which the corresponding elementary vector should be transformed. We thus have

A = \begin{bmatrix} 0&0&0 \\ 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{bmatrix}

so that

Ax = \begin{bmatrix} 0&0&0 \\ 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ x_1 \\ x_2 \\ x_3 \end{bmatrix}

Now consider B. We can construct B by considering its effect on the elementary vectors in \mathbb{R}^4

e_1 = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} \qquad e_2 = \begin{bmatrix} 0 \\ 1 \\ 0 \\ 0 \end{bmatrix} \qquad e_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 0 \end{bmatrix} \qquad e_4 = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 1 \end{bmatrix}

Applying B to each of e_1 through e_4 respectively will shift each of their entries to the left (or up) and produce the following vectors in \mathbb{R}^3:

\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \qquad \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} \qquad \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \qquad \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}

We thus have

B = \begin{bmatrix} 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix}

so that

Bx = \begin{bmatrix} 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} x_2 \\ x_3 \\ x_4 \end{bmatrix}

Constructing the product matrices we have

AB = \begin{bmatrix} 0&0&0 \\ 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{bmatrix} \begin{bmatrix} 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix} = \begin{bmatrix} 0&0&0&0 \\ 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix}

and

BA = \begin{bmatrix} 0&1&0&0 \\ 0&0&1&0 \\ 0&0&0&1 \end{bmatrix} \begin{bmatrix} 0&0&0 \\ 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{bmatrix} = \begin{bmatrix} 1&0&0 \\ 0&1&0 \\ 0&0&1 \end{bmatrix}= I

The product $matrix BA$ corresponds to taking a vector \begin{bmatrix} x_1&x_2&x_3 \end{bmatrix}^T in \mathbb{R}^3 and shifting the entries right to produce a corresponding vector \begin{bmatrix} 0&x_1&x_2&x_3 \end{bmatrix}^T in \mathbb{R}^4 and then shifting the entries left to produce the original vector \begin{bmatrix} x_1&x_2&x_3 \end{bmatrix}^T in \mathbb{R}^3. So BA preserves all vectors and is thus equal to the identity matrix on \mathbb{R}^3.

On the other hand the product $matrix AB$ corresponds to taking a vector \begin{bmatrix} x_1&x_2&x_3&x_4 \end{bmatrix}^T in \mathbb{R}^4 and shifting the entries left to produce a corresponding vector \begin{bmatrix} x_2&x_3&x_4 \end{bmatrix}^T in \mathbb{R}^3 and then shifting the entries right to produce the vector \begin{bmatrix} 0&x_2&x_3&x_4 \end{bmatrix}^T in \mathbb{R}^4. So the net effect of AB is to change the first entry of a vector in \mathbb{R}^4 to zero and preserve the second, third, and fourth entries.

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.

 Buy me a snack to sponsor more posts like this!

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s