Precision of SVD?

7 views (last 30 days)
Zachary
Zachary on 31 Aug 2015
Commented: Zachary on 31 Aug 2015
This is a "what's going on under the hood?" kind of question. I have this symmetric positive-definite matrix C, and I'm interested in its eigenvalues. Since it's SPD, I'm using svd to calculate the eigenvalues.
My question is this: I'm getting a smallest eigenvalue of 10^-35, and second-smallest of order 10^-17, both of which are below machine precision. How is MATLAB calculating the smallest elements here? Additionally, how suspicious of these numbers should I be?
For the curious, I've attached a copy of the matrix I'm working with.
Cheers, Zach
  2 Comments
Matt J
Matt J on 31 Aug 2015
For the curious, this is an imprecise copy of the matrix I'm working with. It won't give exactly the same results, but will do qualitatively the same thing.
Note that you can attach files here and could attach a .mat file for us with the exact matrix C.
Zachary
Zachary on 31 Aug 2015
Excellent -- I've gone ahead and done just that.

Sign in to comment.

Answers (1)

the cyclist
the cyclist on 31 Aug 2015
This is a non-trivial question, and is related to the condition number of the eigenvector matrix. (Not to be confused with the condition number of the matrix itself.)
I suggest you look at this book chapter from Cleve Moler's book, particular Section 10.6 which is about eigenvalue sensitivity and accuracy. This chapter points out some useful functions for estimating accuracy, such as condest.
  1 Comment
Matt J
Matt J on 31 Aug 2015
Edited: Matt J on 31 Aug 2015
I'm getting a smallest eigenvalue of 10^-35, and second-smallest of order 10^-17, both of which are below machine precision.
I agree with cyclist, but one thing I'd comment is that 10^-35 and 10^-17 are not necessarily out of the reach of machine precision, as premised. For example, here is an example where they are the exact eigenvalues, and are exactly recovered.
>> A=diag([1e-17,1e-35]);
>> error = nnz(svd(A)-[1e-17;1e-35])
error =
0

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!