MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: SingularValues of symmetric real matrix not converging


Albert,
    I hope someone else answers this, too, because I use SingularValues[]
all the time, and I can't figure out exactly *why* it won't converge.
Obviously, the matrix is a difficult one to work with, since most elements
differ only in the 17-th & 18-th decimal places; but I would have thought
that evaluating SVD in high precision would handle that:

In[151]:=
N[SingularValues[mat], 32]

SingularValues::"cfail": "Algorithm failed to converge."

O.K., so I looked up the error message with the Help facility -- no luck
here either; Mathematica with typical grace & aplomb omits this message from
its help file.

    So I tried scaling the matrix by multiplying it by 10^15:

SingularValues[1. 10^15 mat]

& this returned Transpose [U-matrix], the vector of s-values, and
Transpose[V-matrix], but only in the rank-7 approximation.  That is because
SVD does indeed have a tolerance flag which omits singular values that are
too small, and the U- and V- elements that correspond to those omitted
s-values.  So, to return *all* elements of the SVD of mat, use

SingularValues[1. 10^15 mat, Tolerance -> 0 ]

, which returns

{1.84975`*^14, 1.84975`*^14, 1.84975`*^14, 1.84975`*^14, \
1.8497499999999997`*^14, 1.8497499999999988`*^14, 1.8497499999999988`*^14, \
3.1778373115434495`}

as the vector of singular values.  See the documentation for
SingularValues[], which explains how to get the condition number of mat from
the above s-vector.

To get  mat back, we need U.DiagonalMatrix[s].V^T, rescaled by dividing s by
10^15:

N[Transpose[utr].DiagonalMatrix[1. 10^-15 sv].vee, 32 ]

{{0.161853, -0.0231219, -0.0231219, -0.0231219, -0.0231219, -0.0231219, -0.0
231219, -0.0231219},
 {-0.0231219, 0.161853, -0.0231219,.....},


  • Prev by Date: Re: Re: Solve...
  • Next by Date: Re: Help, Please Help: bigotime(s) operator
  • Previous by thread: SingularValues of symmetric real matrix not converging
  • Next by thread: Re: [mg 25674] Bugs in Abs etc.