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.
This exercise is part of the course
Linear Algebra for Data Science in R
Exercise instructions
- For the matrix
A
with 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.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# 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)