nxn matrix inversion using eigenvalues??

wwreith

New member
Joined
Dec 8, 2011
Messages
2
I haven't done Linear Algebra in years...

Here is the task I was given as best as I understand it.

"Write code in R to calculate the inverse of a nxn matrix using eigenvalues". I have some knowledge of R, but I don't remember anything about using eigenvalues to find an inverse matrix. Guass-Jordan can be used to find an inverse, but that has nothing to do with eigenvalues. At least I don't think it does.

I know that

det(A)=the product of eigenvalues, but not sure how or if this helps.

Once the code is written I believe we will be modifying it slightly. Otherwise we could just use "solver" in R.
 
It's easy enough to check if a matrix is invertible with eigenvalues, but to get the inverse itself may be tricky.

I would start with getting the eigenvalues and the corresponding eigenvectors.

The first step is to use the characteristic equation: \(\displaystyle c(\lambda)=det(A-\lambda I ) = 0\) where A is the nxn matrix.

With this you can find the eigenvectors by solving: \(\displaystyle (A-\lambda I)\vec{x}=0\) using a particular eigenvalue.

I would suspect the next step would be manipulate \(\displaystyle A\vec{x}=\lambda \vec{x}\) somehow to get \(\displaystyle A^{-1}\).

I can get as far as \(\displaystyle A^{-1} \vec{x} = \frac{1}{\lambda}I\vec{x}\).

I have only taken one linear algebra class though, so I am not sure how to proceed from here. Maybe there is a method out there that is simple, but this would be my approach. If anything, maybe this will jolt your memory or someone else's into giving a solution.

Sorry I couldn't be more helpful, but I noticed no one was responding so though I would give it a shot.
 
I haven't done Linear Algebra in years...

Here is the task I was given as best as I understand it.

"Write code in R to calculate the inverse of a nxn matrix using eigenvalues". I have some knowledge of R, but I don't remember anything about using eigenvalues to find an inverse matrix. Guass-Jordan can be used to find an inverse, but that has nothing to do with eigenvalues. At least I don't think it does.

I know that

det(A)=the product of eigenvalues, but not sure how or if this helps.

Once the code is written I believe we will be modifying it slightly. Otherwise we could just use "solver" in R.

It is a kind of a long problem...

First you need to calculate the corresponding eigenvectors.

For further reading start with:

http://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix
 
It is a kind of a long problem...

First you need to calculate the corresponding eigenvectors.

For further reading start with:

http://en.wikipedia.org/wiki/Eigendecomposition_of_a_matrix

Hmm... But that article doesn't state how we can find the inverse of a non-diagonalizable matrix using eigenvalues.

Finding the inverse of a matrix via eigen-decompostion is only valid for diagonalizable matrices. Unless... I missed something in the article?
 
Last edited:
If the matrix has non-zero and non-repeating eigenvalues (hence unique eigenvectors) - you can diagonalize the matrix. Those N matrices are made up from eigenvectors.
 
If the matrix has non-zero and non-repeating eigenvalues (hence unique eigenvectors) - you can diagonalize the matrix. Those N matrices are made up from eigenvectors.

Yes, but he is looking to "Write code in R to calculate the inverse of a nxn matrix using eigenvalues".

What if the matrix does have repeating eigenvalues? Then we cannot use this method to find the inverse. right?.....
 
New information

I found out that we can in fact assume the matrix is positive definite symmetric, so eigendecomposition should be acceptable. In my original post I had not been told that was an assumption that could be made. Eigendecomposition is not something I have done before so if anyone knows a good link with step by step details that would be great. I still need to code this in R.
 
I found out that we can in fact assume the matrix is positive definite symmetric, so eigendecomposition should be acceptable. In my original post I had not been told that was an assumption that could be made. Eigendecomposition is not something I have done before so if anyone knows a good link with step by step details that would be great. I still need to code this in R.

Well, if we do this with the eigendecomposition method, we will need to find the inverse of other matrices.

\(\displaystyle A^{-1}=QD^{-1}Q^{-1}\)

Where Q's columns are the eigenvectors of A and D is the diagonlized matrix. So, to find the inverse of your original matrix A, you will have to find the inverse of these matrices. So, maybe this is not the method to use?
 
Note that since A is symmetric:

QVQ-1 = QVQT

Finding Q and QT are simple when we know the eigenvectors.
 
Top