Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a matrix $a(\kappa)$ from which I am trying to determine $\kappa$ by using the equation $det(a(\kappa)) = 0$. The matrices I deal with are on the order of 100 X 100 to 500 X 500. Originally I was trying to do this symbolically which of course went no where fast, and so I posted the problem here: Find Determinant/or Row Reduce parameter dependent matrix.

As a result I am now essentially using a singular value decomposition to find $\kappa$. The code is

f[x_?NumericQ] := Last[SingularValueList[a /. \[Kappa] -> x, Tolerance -> 0]]

Then I create a plot for a range of $\kappa$ values which should contain the physically correct $\kappa$. I am getting values of $\kappa$ which fit my expectations, and seem to be correct. The correctness comes form the fact that 1) I am reproducing someone else's work, and 2) $\kappa$ is essentially an eigenvalue and I can check the eigenfunctions.

Right now I can get $\kappa$ to about 4 digits of accuracy that is, if I increase the size of my matrix, my $\kappa$ will converge to about 4 digits buy beyond that the value of the 5th digit is anyone's guess. Are there any tricks to increase the accuracy of the results?

share|improve this question
Have a look at the examples with N under Scope in the SingularValueList documentation –  ssch Oct 21 '13 at 2:59
Without testing this, I will bet that you are using machine precision numbers or arbitrary precision numbers with insufficient precision. Could you provide a sample of your data or at least describe it better? –  Mr.Wizard Oct 21 '13 at 3:00
@ssch, I believe I understand the examples in the link provided. However I cannot get it to work with my code. I tried f[x_?NumericQ] := Last[SingularValueList[ N[a /. \[Kappa]\[CapitalOmega] -> x, Tolerance -> 0], 0]] . And it gives me a plot with horizontal line through the origin. –  tau1777 Oct 21 '13 at 3:34
@Mr.Wizard, I've tried to keep the numbers to a high degree of precision in the matrix (around 50 digits) before attempting this Singular Value List thing. I'll check on this again, and get back to you. To be honest, I've read the documentation about precision and accuracy and working precision lots of times without clearly understanding it or how to implement it. –  tau1777 Oct 21 '13 at 3:38
All of your numbers will need to have sufficient precision. You force (false) precision with SetPrecision (or SetAccuracy if more appropriate), e.g. newdata = SetPrecision[data, 50]. –  Mr.Wizard Oct 21 '13 at 8:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.