Eigenvalues of Positive Definite matrices - &MATLAB

In summary, the author reports that positive definite matrices have positive eigenvalues, but when using functions EIG(), he sometimes gets negative eigenvalues.
  • #1
Sevenbar
3
0
I'm trying to create an algorithm in MATLAB, but I have a problem. According to theory, if G is a positive definite matrix, then it's eigenvalues are positive real numbers. I'm using function EIG() to calculate the eigenvalues and eigenvectors of matrices, but I almost always take and negative numbers as eigenvalues.

F.e.
a =
1 2 3
2 1 2 → Eigenvalues taken: -2.0000, -0.7016, 5.7016
3 2 1
---
a =
0 1 2
1 0 1 → Eigenvalues taken: -2.0000, -0.7321, 2.7321
2 1 0
---

My Questions:
1) How can I test is a matrix is positive definite matrix, without having to test the equation z*Az>0 for every z? (- that's impossible to test in that way, for every possible z!).

2) Are the above example matrices Positive Definite? And if not why?

3) Can anyone provide me with 3x3, 4x4 or 5x5 at least Positive Definite matrices? ..

4) If the example matrices I gave, are positive definite, then why EIG() is giving me negative eigenvalues? I use it as [V,D]=eig(a) (-the eigenvalues are at the diagonal of D).

5) And, are the eigenvalues I show here, correct for these two example matrices?...!...

That's my questions. If anyone can help.. Thanks :)

Ps. I'm not mathematician, so please, if you can, don't mess me with with "high-complexibilty" mathematics/theories.
 
Physics news on Phys.org
  • #2
1. It is porefectly possible to prove that a matrix is positive definite, and you don't just check every possible z. You could try finding the eigenvalues... If you really want to you could just work out what (x,y,z)A(x,y,z)^t is as a function of x,y,z and see if it is ever negative using some optimization routines, or working it out bby hand if that it is impractical.

2. No, they are not. They have negative eigenvalues.

3. The identity matrix. Any diagonal matrix with postive entries on the diagonal.

4.

5. Work them out by hand for yourself if you don't trust the computer. It is just writing out a cubic equation and finding the roots.
 
  • #3
New arising problems

Hi.. Thanks for answering and help me...
However I have some more questions... In order to write mathematical types, I wrote that question in PDF, and I use it as attachment to this forum-thread.

Please read the PDF, and if you know what I might do wrong, answer me...
 

Attachments

  • MathematicsQuestion_IMED.pdf
    54.2 KB · Views: 368
  • #4
Taking a simple example, where G=[3x3] matrix, I noticed that I get negative eigenvalues using the expressions of the PDF I have attached above, if I give the σ > ~2.1. Thus I have no problem if I use σ < 2 values. But the question remains.. Why for σ > 2, I get negative eigenvalues, in contrast with what the author report?..
 

1. What is the significance of eigenvalues in positive definite matrices?

Eigenvalues represent the scaling factor of the eigenvector in a matrix transformation. In positive definite matrices, eigenvalues are always positive, which indicates that the matrix transformation only results in stretching or shrinking the original vector without changing its direction.

2. How can I determine the eigenvalues of a positive definite matrix using MATLAB?

MATLAB has a built-in function called "eig" that can be used to compute the eigenvalues of a matrix. Simply pass the positive definite matrix as an argument to the function and it will return a vector of eigenvalues.

3. Is it possible for a positive definite matrix to have complex eigenvalues?

No, it is not possible for a real positive definite matrix to have complex eigenvalues. This is because the matrix is symmetric, and the eigenvalues of a symmetric matrix are always real.

4. How can I check if a matrix is positive definite in MATLAB?

MATLAB has a function called "isposdef" that can be used to determine if a matrix is positive definite. This function returns a logical value, where 1 indicates that the matrix is positive definite and 0 indicates that it is not.

5. Can a matrix have multiple positive definite eigenvalues?

Yes, a matrix can have multiple positive definite eigenvalues. This means that there are multiple directions in which the matrix transformation only results in stretching or shrinking the vector without changing its direction.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
848
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
574
  • Math POTW for Graduate Students
Replies
1
Views
454
  • Programming and Computer Science
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
6K
  • Introductory Physics Homework Help
Replies
1
Views
683
  • Calculus and Beyond Homework Help
Replies
2
Views
355
  • Linear and Abstract Algebra
Replies
12
Views
1K
Back
Top