Matlab returns inf for the eigenvalues for an overdetermined linear system with the eig function, but the eigenvalues should not return infinit.

I am currently solving linear systems with the eig() function and the eigenvalues that it returns are infinit. How can I solve this? (The eigenvalues should not be infinit)
My actual matrix is rather large so I use a example here for simplicity. We have the following linear differential system:
dx1/dt= 3x1
0 = x1 - x2
The solutions are of the form x= [c1 c2] e^Lt
To solve this differential equation I have the following matrices.
>> A = [1 0;0 0];
>> B = [3 0;1 -1];
With which I use the eig function to solve this problem for L. The eigenvalues that it should return are 3 and 3. But however, it returns:
>> A = [1 0;0 0];
>> B = [3 0;1 -1];
>> E = eig(B,A)
E =
-Inf
3
How can I solve this? If anything is unclear, please let me know.

4 commentaires

A is singular. According to the doc, it is trying to solve the problem
A^-1*B = gamma
So if you try to do this in MATLAB it will give you an inf matrix for A inverse due to the singularity. The documentation states that the algorithm will use the QZ method when A is singular. I'm personally not familiar with it.
Oke, thank you very much. That explains the infinite values. But does someone know how to solve this? With the qz function itself I come to the same answers.
What method are you using to determine there are two equivalent eigenvalues? The QZ function will give the same answer because that is how eig processes the singular matrix.
Maybe I gave an incorrect description. You do indeed get only one eigenvalue. The value of 3. With algebraic multiplicity of 1. But if you know that x1=x2, then you now that the labda must also be equal to three.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Produits

Question posée :

le 14 Mai 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by