Section 7 Problem Set 7

  • Due: Wednesday November 3 by 11:59pm CST. This problem set covers the material from

    • 5.1. Eigenvectors
    • 5.2. Eigenvalues
    • 5.3. Eigenbasis
  • Upload your solutions to Moodle in a PDF.

  • Please feel free to use RStudio for all row reductions.

  • You can download the Rmd source file for this problem set.

7.1 Rental Cars Revisited

Below is the rental car matrix from PS4.5.

StP = c(.85,.09,.06)
Roch = c(.30,.60,.10)
Dul = c(.35,.05,.60) 
(M = cbind(StP,Roch,Dul))
##       StP Roch  Dul
## [1,] 0.85  0.3 0.35
## [2,] 0.09  0.6 0.05
## [3,] 0.06  0.1 0.60
  1. Find its eigenvectors and eigenvalues. You should see that one of the eigenvalues is 1. This always happens when the columns sum to 1 (we will prove this later). An eigenvector of eigenvalue 1 is called a steady state vector because we have A v = v. There are also two complex eigenvalues and eigenvectors (we will talk about these next week).

  2. Extract the eigenvector corresponding to eigenvalue 1. You will see that it has a 0 imaginary part. You can get rid of the imaginary part of a vector v by using w = Re(v). This gives the real part of v. Demonstrate that A w = w.

  3. Rescale the eigenvector so that it sums to 1. By using sum(w) you can sum the components of the vector. When the vector sums to 1, you can think of the components as the proportion of cars at each rental company.

  4. Compare this with the steady state you found by looping when you worked on this in problem set 4.

x = c(40,35,25)
for (i in 1:100) {x = M %*% x}
x

7.2 Diagonalization

  1. By hand, find the characteristic polynomial, the eigenvalues, and the eigenvectors of the matrix \(A = \begin{bmatrix} 0 & 1 \\ 2 & 1 \end{bmatrix}\). Then diagonalize the matrix \(A\) by writing it as a product \(A = P D P^{-1}\) where \(D\) is diagonal.

  2. The matrix \(B\) below has characteristic polynomial \(f_B(\lambda) = -\lambda ^3+6 \lambda ^2-9 \lambda = -\lambda(\lambda-3)^2\), \[ B = \begin{bmatrix} 2 & -1 & -1 \\ -1 & 2 & -1 \\ -1 & -1 & 2 \\ \end{bmatrix}. \] Use the following information to diagonalize \(B\). That is, write it as \(B = P D P^{-1}\),with \(D\) diagonal. You do not have to find \(P^{-1}\). \[ \begin{bmatrix} 2 & -1 & -1 \\ -1 & 2 & -1 \\ -1 & -1 & 2 \\ \end{bmatrix} \longrightarrow \begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \\ \end{bmatrix} \] \[ \begin{bmatrix} -1 & -1 & -1 \\ -1 & -1 & -1 \\ -1 & -1 & -1 \\ \end{bmatrix} \longrightarrow \begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{bmatrix} \]

  3. Diagonalize the matrix \(C\) using R. You should find a matrix \(P\) and compute the diagonal matrix \(D = P^{-1} C P\). If you use the function zapsmall it will turn any really small numbers into 0.

(C = cbind(c(44, 14, -13), c(10, 49, -2), c(-18, 0, 33)))
##      [,1] [,2] [,3]
## [1,]   44   10  -18
## [2,]   14   49    0
## [3,]  -13   -2   33
  1. Show that the matrix below is not diagonalizable by showing that it does not have a basis of eigenvectors. Is it invertible? \[ D = \begin{bmatrix} 0 & 1 \\ -1 & 2 \\ \end{bmatrix}. \]

7.3 Same Eigenvectors

Here are two matrices

(A = cbind(c(-8, 3, 29), c(-40, 24, 46), c(10, 3, 11)))
##      [,1] [,2] [,3]
## [1,]   -8  -40   10
## [2,]    3   24    3
## [3,]   29   46   11
(B = cbind(c(4, 3, 35), c(-49, 42, 55), c(13, 3, 26)))
##      [,1] [,2] [,3]
## [1,]    4  -49   13
## [2,]    3   42    3
## [3,]   35   55   26
  1. Use R to show that they have the same eigenvectors but different eigenvalues.

  2. Show that \(A B = B A\) (even though we know that, in general, matrices do not commute).

  3. Now let \(A\) and \(B\) be any \(n \times n\) matrices which have the same eigenvectors. Prove that \(AB = BA\). Hint: use the diagonalization of these two matrices. We will cover diagonalization on Friday and Monday.

7.4 Rain and Sunshine Revisited

On PS4, we encountered the rain-sunshine matrix \(A\) below \[ A = \begin{bmatrix} 1/2 & 1/10 \\ 1/2 & 9/10 \\ \end{bmatrix}. \] Perform the following calculations by hand and show your work.

  1. Find the characteristic polynomial of \(A\) and find its eigenvalues. Remember that the characteristic polynomial is the polynomial \(f_A(\lambda) = \det(A - \lambda I)\).

  2. Find an eigenvector for each eigenvalue and describe the eigenspaces.

  3. Diagonalize \(A\).

  4. Use your answer to (c) to give a formula for \(A^n\) and use this formula to compute \(\displaystyle{\lim_{n\to \infty}} A^n\).

  5. Write a loop in R that computes \(A^{100}\). Do this as follows:

    1. Start with B = A
    2. Loop 100 times: at each step in the loop, let B = A %*% B.

Compare the answer that you get to your answer to part (d).

7.5 The Square Root of a Matrix?

Do this problem by hand.

The matrix \(A =\begin{bmatrix} 7 & 2 \\ -4 & 1 \end{bmatrix}\) has characteristic polynomial \(c(\lambda) = \lambda^2 - 8 \lambda + 15 = (\lambda -3)(\lambda - 5).\)

  1. Describe the eigenspaces of \(A\).
  2. Diagonalize \(A\). We will learn how to do this on Friday.
  3. Find a matrix that makes sense to call \(\sqrt{A}\). Then show that when you square this matrix, you really do get matrix \(A\).