Verifying the Math on Eigenvalues
In this exercise you'll find the eigenvalues \(\lambda\) of a matrix \(A\), and show that they satisfy the property that the matrix \(\lambda I - A\) is not invertible, with determinant equal to zero.
Bu egzersiz
Linear Algebra for Data Science in R
kursunun bir parçasıdırEgzersiz talimatları
- For the matrix
Awith the following R output:
[,1] [,2]
[1,] 1 2
[2,] 1 1
find both eigenvalues.
- Show that, for each eigenvalue lambda (\(\lambda\)), that the determinant of \(\lambda * I - A\) is equal to zero and hence the matrix \(\lambda * I - A\) is not invertible.
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Compute the eigenvalues of A and store in Lambda
Lambda <- eigen(___)
# Print eigenvalues
print(Lambda$values[___])
print(Lambda$values[___])
# Verify that these numbers satisfy the conditions of being an eigenvalue
det(Lambda$values[___]*diag(2) - A)
det(Lambda$values[2]*diag(___) - A)