We now have the background to understand the main ideas behind the diagonalization process.

##### Definition12.4.1Eigenvalue, Eigenvector

Let $A$ be an $n\times n$ matrix over $\mathbb{R}$. $\lambda$ is an eigenvalue of $A$ if for some nonzero column vector $\vec{x}\in \mathbb{R}^n$ we have $A \vec{x} = \lambda \vec{x}$. $\vec{x}$ is called an eigenvector corresponding to the eigenvalue $\lambda$.

##### Example12.4.2Examples of eigenvalues and eigenvectors

Find the eigenvalues and corresponding eigenvectors of the matrix $A=\left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)$.

We want to find nonzero vectors $\vec{x} = \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)$ and real numbers $\lambda$ such that \begin{align} \begin{split} A X = \lambda X \quad &\Leftrightarrow \left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)\left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right) = \lambda \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)\\ & \Leftrightarrow \left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)\left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right) - \lambda \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)\\ & \Leftrightarrow \left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)\left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right) - \lambda \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)\\ & \Leftrightarrow \left( \left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right) - \lambda \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \\ \end{array} \right) \right)\left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)\\ & \Leftrightarrow \left( \begin{array}{cc} 2-\lambda & 1 \\ 2 & 3-\lambda \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)\\ \end{split}\label{equation-evalue-logic}\tag{12.4.1} \end{align}

The last matrix equation will have nonzero solutions if and only if $\det \left( \begin{array}{cc} 2-\lambda & 1 \\ 2 & 3-\lambda \\ \end{array} \right) =0$ or $(2 - \lambda )(3 -\lambda ) - 2 = 0$, which simplifies to $\lambda^2 - 5\lambda + 4 = 0$. Therefore, the solutions to this quadratic equation, $\lambda_1 = 1$ and $\lambda_2 = 4$, are the eigenvalues of $A$. We now have to find eigenvectors associated with each eigenvalue.

Case 1. For $\lambda_1= 1$, Equation (12.4.1) becomes: $\left( \begin{array}{cc} 2-1 & 1 \\ 2 & 3-1 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right) \\ \\ \left( \begin{array}{cc} 1 & 1 \\ 2 & 2 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)\textrm{ }$ which reduces to the single equation, $x_1+ x_2= 0$. From this, $x_1= -x_2$. This means the solution set of this equation is (in column notation) $E_1 = \left\{ \left.\left( \begin{array}{c} -c \\ c \\ \end{array} \right) \right| c\in \mathbb{R}\right\}$ So any column vector of the form $\left( \begin{array}{c} -c \\ c \\ \end{array} \right)$ where $c$ is any nonzero real number is an eigenvector associated with $\lambda_1=1$. The reader should verify that, for example, $\left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)\left( \begin{array}{c} \frac{2}{3} \\ -\frac{2}{3} \\ \end{array} \right) = 1 \left( \begin{array}{c} \frac{2}{3} \\ -\frac{2}{3} \\ \end{array} \right)$ so that $\left( \begin{array}{c} \frac{2}{3} \\ -\frac{2}{3} \\ \end{array} \right)$ is an eigenvector associated with eigenvalue 1.

Case 2. For $\lambda_2=4$ Equation (12.4.1) becomes: $\left( \begin{array}{cc} 2-4 & 1 \\ 2 & 3-4 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right) \\ \\ \left( \begin{array}{cc} -2 & 1 \\ 2 & -1 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ 0 \\ \end{array} \right)$ which reduces to the single equation $-2x_1+x_2=0$, so that $x_2= 2x_1$. The solution set of the equation is $E_2=\left\{\left.\left( \begin{array}{c} c \\ 2c \\ \end{array} \right)\right| c\in \mathbb{R}\right\}$ Therefore, all eigenvectors of $A$ associated with the eigenvalue $\lambda_2 = 4$ are of the form $\left( \begin{array}{c} c \\ 2c \\ \end{array} \right)$, where $c$ can be any nonzero number.

The following theorems summarize the most important aspects of the previous example.

The equation $\det (A - \lambda I) = 0$ is called the characteristic equation, and the left side of this equation is called the characteristic polynomial of $A$.

The solution space of $(A-\lambda I)\vec{x}=\vec{0}$ is called the eigenspace of $A$ corresponding to $\lambda$. This terminology is justified by Exercise 2 of this section.

We now consider the main aim of this section. Given an $n\times n$ (square) matrix $A$, we would like to transform $A$ into a diagonal matrix $D$, perform our tasks with the simpler matrix $D$, and then describe the results in terms of the given matrix $A$.

##### Definition12.4.5Diagonalizable Matrix.

An $n\times n$ matrix $A$ is called diagonalizable if there exists an invertible $n\times n$ matrix $P$ such that $P^{-1} A P$ is a diagonal matrix $D$. The matrix $P$ is said to diagonalize the matrix $A$.

##### Example12.4.6Diagonalization of a Matrix

We will now diagonalize the matrix $A$ of Example 12.4.2. We form the matrix $P$ as follows: Let $P^{(1)}$ be the first column of $P$. Choose for $P^{(1)}$ any eigenvector from $E_1$. We may as well choose a simple vector in $E_1$ so $P^{(1)}=\left( \begin{array}{c} 1 \\ -1 \\ \end{array} \right)$ is our candidate.

Similarly, let $P^{(2)}$ be the second column of $P$, and choose for $P^{(2)}$ any eigenvector from $E_2$. The vector $P^{(2)}=\left( \begin{array}{c} 1 \\ 2 \\ \end{array} \right)$ is a reasonable choice, thus $P= \left( \begin{array}{cc} 1 & 1 \\ -1 & 2 \\ \end{array} \right) \textrm{ and } P^{-1}= \frac{1}{3}\left( \begin{array}{cc} 2 & -1 \\ 1 & 1 \\ \end{array} \right)=\left( \begin{array}{cc} \frac{2}{3} & -\frac{1}{3} \\ \frac{1}{3} & \frac{1}{3} \\ \end{array} \right)$ so that $P^{-1} A P = \frac{1}{3}\left( \begin{array}{cc} 2 & -1 \\ 1 & 1 \\ \end{array} \right)\left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)\left( \begin{array}{cc} 1 & 1 \\ -1 & 2 \\ \end{array} \right) = \left( \begin{array}{cc} 1 & 0 \\ 0 & 4 \\ \end{array} \right)$ Notice that the elements on the main diagonal of $D$ are the eigenvalues of $A$, where $D_{i i}$ is the eigenvalue corresponding to the eigenvector $P^{(i)}$ .

##### Note12.4.7

1. The first step in the diagonalization process is the determination of the eigenvalues. The ordering of the eigenvalues is purely arbitrary. If we designate $\lambda_1 = 4$ and $\lambda_2=1$, the columns of $P$ would be interchanged and $D$ would be $\left( \begin{array}{cc} 4 & 0 \\ 0 & 1 \\ \end{array} \right)$ (see Exercise 3b of this section). Nonetheless, the final outcome of the application to which we are applying the diagonalization process would be the same.

2. If $A$ is an $n\times n$ matrix with distinct eigenvalues, then $P$ is also an $n\times n$ matrix whose columns $P^{(1)}$, $P^{(2)}, \ldots$, $P^{(n)}$ are $n$ linearly independent vectors.

##### Example12.4.8Diagonalization of a 3 by 3 matrix

Diagonalize the matrix $A= \left( \begin{array}{ccc} 1 & 12 & -18 \\ 0 & -11 & 18 \\ 0 & -6 & 10 \\ \end{array} \right)$.

First, we find the eigenvalues of $A$. \begin{equation*} \begin{split} \det (A-\lambda I) &=\det \left( \begin{array}{ccc} 1-\lambda & 12 & -18 \\ 0 & -\lambda -11 & 18 \\ 0 & -6 & 10-\lambda \\ \end{array} \right)\\ &=(1-\lambda ) \det \left( \begin{array}{cc} -\lambda -11 & 18 \\ -6 & 10-\lambda \\ \end{array} \right)\\ &=(1-\lambda ) ((-\lambda -11)(10-\lambda )+108) = (1-\lambda ) \left(\lambda ^2+\lambda -2\right) \end{split} \end{equation*} Hence, the equation $\det (A-\lambda I)$ becomes $(1-\lambda ) \left(\lambda ^2+\lambda -2\right) =- (\lambda -1)^2(\lambda +2)$ Therefore, our eigenvalues for $A$ are $\lambda_1= -2$ and $\lambda_2=1$. We note that we do not have three distinct eigenvalues, but we proceed as in the previous example.

Case 1. For $\lambda_1= -2$ the equation $(A-\lambda I)\vec{x}= \vec{0}$ becomes $\left( \begin{array}{ccc} 3 & 12 & -18 \\ 0 & -9 & 18 \\ 0 & -6 & 12 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)= \left( \begin{array}{c} 0 \\ 0 \\ 0 \\ \end{array} \right)$ We can row reduce the matrix of coefficients to $\left( \begin{array}{ccc} 1 & 0 & 2 \\ 0 & 1 & -2 \\ 0 & 0 & 0 \\ \end{array} \right)$.

The matrix equation is then equivalent to the equations $x_1 = -2x_3 \textrm{ and } x_2= 2x_3$. Therefore, the solution set, or eigenspace, corresponding to $\lambda_1=-2$ consists of vectors of the form $\left( \begin{array}{c} -2x_3 \\ 2x_3 \\ x_3 \\ \end{array} \right)= x_3\left( \begin{array}{c} -2 \\ 2 \\ 1 \\ \end{array} \right)$

Therefore $\left( \begin{array}{c} -2 \\ 2 \\ 1 \\ \end{array} \right)$ is an eigenvector corresponding to the eigenvalue $\lambda_1=-2$, and can be used for our first column of $P$: $P= \left( \begin{array}{ccc} -2 & ? & ? \\ 2 & ? & ? \\ 1 & ? & ? \\ \end{array} \right)$

Before we continue we make the observation: $E_1$ is a subspace of $\mathbb{R}^3$ with basis $\left\{P^{(1)}\right\}$ and $\dim E_1 = 1$.

Case 2. If $\lambda_2= 1$, then the equation $(A-\lambda I)\vec{x}= \vec{0}$ becomes $\left( \begin{array}{ccc} 0 & 12 & -18 \\ 0 & -12 & 18 \\ 0 & -6 & 9 \\ \end{array} \right) \left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)= \left( \begin{array}{c} 0 \\ 0 \\ 0 \\ \end{array} \right)$

Without the aid of any computer technology, it should be clear that all three equations that correspond to this matrix equation are equivalent to $2 x_2-3x_3= 0$, or $x_2= \frac{3}{2}x_3$. Notice that $x_1$ can take on any value, so any vector of the form $\left( \begin{array}{c} x_1 \\ \frac{3}{2}x_3 \\ x_3 \\ \end{array} \right)=x_1\left( \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right)+x_3\left( \begin{array}{c} 0 \\ \frac{3}{2} \\ 1 \\ \end{array} \right)$ will solve the matrix equation.

We note that the solution set contains two independent variables, $x_1$ and $x_3$. Further, note that we cannot express the eigenspace $E_2$ as a linear combination of a single vector as in Case 1. However, it can be written as $E_2= \left\{x_1\left( \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right)+x_3\left( \begin{array}{c} 0 \\ \frac{3}{2} \\ 1 \\ \end{array} \right) \mid x_1,x_3\in \mathbb{R}\right\}.$

We can replace any vector in a basis is with a nonzero multiple of that vector. Simply for aesthetic reasons, we will multiply the second vector that generates $E_2$ by 2. Therefore, the eigenspace $E_2$ is a subspace of $\mathbb{R}^3$ with basis $\left\{\left( \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right),\left( \begin{array}{c} 0 \\ 3 \\ 2 \\ \end{array} \right)\right\}$ and so $\dim E_2 = 2$.

What this means with respect to the diagonalization process is that $\lambda_2= 1$ gives us both Column 2 and Column 3 the diagonalizing matrix. The order is not important so we have $P= \left( \begin{array}{ccc} -2 & 1 & 0 \\ 2 & 0 & 3 \\ 1 & 0 & 2 \\ \end{array} \right)$

The reader can verify (see Exercise 5 of this section) that $P^{-1}= \left( \begin{array}{ccc} 0 & 2 & -3 \\ 1 & 4 & -6 \\ 0 & -1 & 2 \\ \end{array} \right)$ and $P^{-1}A P = \left( \begin{array}{ccc} -2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$

In doing Example 12.4.8, the given $3\times 3$ matrix $A$ produced only two, not three, distinct eigenvalues, yet we were still able to diagonalize $A$. The reason we were able to do so was because we were able to find three linearly independent eigenvectors. Again, the main idea is to produce a matrix $P$ that does the diagonalizing. If $A$ is an $n \times n$ matrix, $P$ will be an $n\times n$ matrix, and its $n$ columns must be linearly independent eigenvectors. The main question in the study of diagonalizability is “When can it be done?” This is summarized in the following theorem.

##### Proof

We now give an example of a matrix that is not diagonalizable.

##### Example12.4.10A Matrix that is Not Diagonalizable

Let us attempt to diagonalize the matrix $A = \left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 2 & 1 \\ 1 & -1 & 4 \\ \end{array} \right)$

First, we determine the eigenvalues. \begin{equation*} \begin{split} \det (A-\lambda I) &= \det \left( \begin{array}{ccc} 1-\lambda & 0 & 0 \\ 0 & 2-\lambda & 1 \\ 1 & -1 & 4-\lambda \\ \end{array} \right)\\ &= (1-\lambda) \det \left( \begin{array}{cc} 2-\lambda & 1 \\ -1 & 4-\lambda \\ \end{array} \right)\\ & = (1-\lambda )((2-\lambda )(4-\lambda )+1)\\ & = (1-\lambda )\left(\lambda ^2-6\lambda +9\right)\\ & = (1-\lambda)(\lambda -3)^2 \end{split} \end{equation*} Therefore there are two eigenvalues, $\lambda_1= 1$ and $\lambda_2=3$. Since $\lambda_1$ is an eigenvalue of degree one, it will have an eigenspace of dimension 1. Since $\lambda_2$ is a double root of the characteristic equation, the dimension of its eigenspace must be 2 in order to be able to diagonalize.

Case 1. For $\lambda_1= 1$, the equation $(A-\lambda I)\vec{x} = \vec{0}$ becomes $\left( \begin{array}{ccc} 0 & 0 & 0 \\ 0 & 1 & 1 \\ 1 & -1 & 3 \\ \end{array} \right)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)= \left( \begin{array}{c} 0 \\ 0 \\ 0 \\ \end{array} \right)$

Row reduction of this system reveals one free variable and eigenspace $\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)=\left( \begin{array}{c} -4x_3 \\ -x_3 \\ x_3 \\ \end{array} \right)= x_3\left( \begin{array}{c} -4 \\ -1 \\ 1 \\ \end{array} \right)$ Hence, $\left\{\left( \begin{array}{c} -4 \\ -1 \\ 1 \\ \end{array} \right)\right\}$ is a basis for the eigenspace of $\lambda_1= 1$.

Case 2. For $\lambda_2= 3$, the equation $(A-\lambda I)\vec{x} = \vec{0}$ becomes $\left( \begin{array}{ccc} -2 & 0 & 0 \\ 0 & -1 & 1 \\ 1 & -1 & 1 \\ \end{array} \right)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)= \left( \begin{array}{c} 0 \\ 0 \\ 0 \\ \end{array} \right)$

Once again there is only one free variable in the row reduction and so the dimension of the eigenspace will be one: $\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \\ \end{array} \right)=\left( \begin{array}{c} 0 \\ x_3 \\ x_3 \\ \end{array} \right)= x_3\left( \begin{array}{c} 0 \\ 1 \\ 1 \\ \end{array} \right)$ Hence, $\left\{\left( \begin{array}{c} 0 \\ 1 \\ 1 \\ \end{array} \right)\right\}$ is a basis for the eigenspace of $\lambda_2= 3$. This means that $\lambda_2= 3$ produces only one column for $P$. Since we began with only two eigenvalues, we had hoped that $\lambda_2= 3$ would produce a vector space of dimension two, or, in matrix terms, two linearly independent columns for $P$. Since $A$ does not have three linearly independent eigenvectors $A$ cannot be diagonalized.

##### Note12.4.11Sage Note - Diagonalization

We demonstrate how diagonalization can be done in Sage. We start by defining the matrix to be diagonalized, and also declare $D$ and $P$ to be variables.

We have been working with “right eigenvectors” since the \pmb{ $x$} in $A \vec{x} = \lambda \vec{x}$ is a column vector. It's not so common but still desirable in some situations to consider “left eigenvectors,” so Sage allows either one. The right_eigenmatrix method returns a pair of matrices. The diagonal matrix, $D$, with eigenvalues and the diagonalizing matrix, $P$, which is made up of columns that are eigenvectors corresponding to the eigenvectors of $D$.

We should note here that $P$ is not unique because even if an eigenspace has dimension one, any nonzero vector in that space will serve as an eigenvector. For that reason, the $P$ generated by Sage isn't necessarily the same as the one computed by any other computer algebra system such as Mathematica. Here we verify the result for our Sage calculation. Recall that an asterisk is used for matrix multiplication in Sage.

Here is a second matrix to diagonalize.

Here we've already specified that the underlying system is the rational numbers. Since the eigenvalues are not rational, Sage will revert to approximate number by default. We'll just pull out the matrix of eigenvectors this time and display rounded entries.

Finally, we examine how Sage reacts to the matrix from Example 12.4.10 that couldn't be diagonalized. Notice that the last column is a zero column, indicating the absence of one needed eigenvector.

# Subsection12.4.1Exercises for Section 12.4¶ permalink

##### 1

1. List three different eigenvectors of $A=\left( \begin{array}{cc} 2 & 1 \\ 2 & 3 \\ \end{array} \right)$, the matrix of Example 12.4.2, associated with each of the two eigenvalues 1 and 4. Verify your results.

2. Choose one of the three eigenvectors corresponding to 1 and one of the three eigenvectors corresponding to 4, and show that the two chosen vectors are linearly independent.

##### 2

1. Verify that $E_1$ and $E_2$ in Example 12.4.1 are vector spaces over $\mathbb{R}$. Since they are also subsets of $\mathbb{R}^2$, they are called subvector-spaces, or subspaces for short, of $\mathbb{R}^2$. Since these are subspaces consisting of eigenvectors, they are called eigenspaces.

2. Use the definition of dimension in the previous section to find $\dim E_1$ and $\dim E_2$ . Note that $\dim E_1 + dim E_2 = \dim \mathbb{R}^2$. This is not a coincidence.

##### 3

1. Verify that $P^{-1} A P$ is indeed equal to $\left( \begin{array}{cc} 1 & 0 \\ 0 & 4 \\ \end{array} \right)$, as indicated in Example 12.4.6

2. Choose $P^{(1)}=\left( \begin{array}{c} 1 \\ 2 \\ \end{array} \right)$ and $P^{(2)}=\left( \begin{array}{c} 1 \\ -1 \\ \end{array} \right)$ and verify that the new value of $P$ satisfies $P^{-1} A P=\left( \begin{array}{cc} 4 & 0 \\ 0 & 1 \\ \end{array} \right)$

3. Take any two linearly independent eigenvectors of the matrix $A$ of Example 12.4.6 and verify that $P^{-1} A P$ is a diagonal matrix.

##### 4

1. Let A be the matrix in Example 12.4.3 and $P=\left( \begin{array}{ccc} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 1 & 0 & 2 \\ \end{array} \right)$. Without doing any actual matrix multiplications, determine the value of $P^{-1} A P$

2. If you choose the columns of $P$ in the reverse order, what is $P^{-1} A P$?

##### 5

Diagonalize the following, if possible:

1. $\left( \begin{array}{cc} 1 & 2 \\ 3 & 2 \\ \end{array} \right)$

2. $\left( \begin{array}{cc} -2 & 1 \\ -7 & 6 \\ \end{array} \right)$

3. $\left( \begin{array}{cc} 3 & 0 \\ 0 & 4 \\ \end{array} \right)$

4. $\left( \begin{array}{ccc} 1 & -1 & 4 \\ 3 & 2 & -1 \\ 2 & 1 & -1 \\ \end{array} \right)$

5. $\left( \begin{array}{ccc} 6 & 0 & 0 \\ 0 & 7 & -4 \\ 9 & 1 & 3 \\ \end{array} \right)$

6. $\left( \begin{array}{ccc} 1 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 1 \\ \end{array} \right)$

##### 6

Diagonalize the following, if possible:

1. $\left( \begin{array}{cc} 0 & 1 \\ 1 & 1 \\ \end{array} \right)$

2. $\left( \begin{array}{cc} 2 & 1 \\ 4 & 2 \\ \end{array} \right)$

3. $\left( \begin{array}{cc} 2 & -1 \\ 1 & 0 \\ \end{array} \right)$

4. $\left( \begin{array}{ccc} 1 & 3 & 6 \\ -3 & -5 & -6 \\ 3 & 3 & 6 \\ \end{array} \right)$

5. $\left( \begin{array}{ccc} 1 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \\ \end{array} \right)$

6. $\left( \begin{array}{ccc} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 \\ \end{array} \right)$

##### 7

Let $A$ and $P$ be as in Example 12.4.8. Show that the columns of the matrix $A P$ can be found by computing $A P^{(1)}$, $A P^{(2)},\ldots,$ $A P^{(n)}$.

Prove that if $P$ is an $n\times n$ matrix and $D$ is a diagonal matrix with diagonal entries $d_1$, $d_2,\ldots,$ $d_n$, then $P D$ is the matrix obtained from $P$, by multiplying column $i$ of $P$ by $d_i$, $i = 1, 2, \ldots, n$.