#11248: SVD matrix decomposition may return a non-invertible "unitary" matrix
------------------------------+---------------------------------------------
   Reporter:  rbeezer         |          Owner:  jason, was
       Type:  defect          |         Status:  new       
   Priority:  major           |      Milestone:  sage-4.7  
  Component:  linear algebra  |       Keywords:            
Work_issues:                  |       Upstream:  N/A       
   Reviewer:                  |         Author:            
     Merged:                  |   Dependencies:            
------------------------------+---------------------------------------------

Comment(by slabbe):

 Hi Rob,
 Hi Samuel,

 I just tested the lines Rob gave and I also get the final column of zeros.

 Sébastien

 {{{
 slabbe@pol ~ $ uname -a
 Darwin pol 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT
 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386 MacBook5,1 Darwin

 slabbe@pol ~ $ gcc -v
 Using built-in specs.
 Target: i686-apple-darwin9
 Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking
 -enable-werror --prefix=/usr --mandir=/share/man --enable-
 languages=c,objc,c++,obj-c++ --program-transform-
 name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0
 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple
 --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
 Thread model: posix
 gcc version 4.0.1 (Apple Inc. build 5493)

 slabbe@pol ~ $ sage --version
 Sage Version 4.6.2, Release Date: 2011-02-25

 slabbe@pol ~ $ sage -python
 Python 2.6.4 (r264:75706, Mar  7 2011, 10:43:40)
 [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>>
 >>>
 >>> import numpy
 >>> import scipy.linalg
 >>> A = numpy.array( [[1 - 1j,     -3j, -2 + 1j,      1, -2 + 3j],
 ...                  [ 1 - 1j, -2 + 1j,  1 + 4j,      0,  2 + 1j],
 ...                  [     -1, -5 + 1j, -2 + 1j, 1 + 1j, -5 - 4j],
 ...                  [-2 + 4j,  2 - 1j,  8 - 4j, 1 - 8j,  3 - 2j]])
 >>> U, S, VH = scipy.linalg.svd(A)
 >>> VH
 array([[-0.10378056+0.25534799j,  0.22371070-0.07765616j,
          0.55736639-0.40276461j, -0.04874824-0.50177439j,
          0.32025785-0.19584279j],
        [-0.28067375-0.0116824j , -0.49586800+0.1305711j ,
          0.14432786+0.08803575j,  0.21076793+0.04575091j,
         -0.19220732-0.73899332j],
        [ 0.10136055-0.1681669j ,  0.13465050+0.69687595j,
          0.19709231-0.03497225j, -0.42056091+0.37188099j,
          0.28760069-0.14046187j],
        [-0.27289262+0.66077235j,  0.06177902+0.25464336j,
         -0.52050549+0.06307174j,  0.11847581-0.00883692j,
          0.35771384-0.05719981j],
        [ 0.00000000+0.j        ,  0.00000000+0.j        ,
          0.00000000+0.j        ,  0.00000000+0.j        ,  0.00000000+0.j
 ]])
 >>> numpy.dot(VH, VH.conj().T)
 array([[  1.00000000e+00 +1.38777878e-17j,
          -8.32667268e-17 +2.84494650e-16j,
           1.38777878e-16 -1.45716772e-16j,
          -1.94289029e-16 +1.38777878e-17j,
           0.00000000e+00 +0.00000000e+00j],
        [ -8.32667268e-17 -2.77555756e-16j,
           1.00000000e+00 +0.00000000e+00j,
          -7.56339436e-16 +1.38777878e-16j,
           5.55111512e-17 -1.66533454e-16j,
           0.00000000e+00 +0.00000000e+00j],
        [  1.38777878e-16 +1.17961196e-16j,
          -7.56339436e-16 -1.28369537e-16j,
           1.00000000e+00 +6.93889390e-18j,
          -3.88578059e-16 +4.16333634e-17j,
           0.00000000e+00 +0.00000000e+00j],
        [ -1.94289029e-16 -1.04083409e-17j,
           5.55111512e-17 +1.99493200e-16j,
          -3.88578059e-16 -2.08166817e-17j,
           1.00000000e+00 -6.93889390e-18j,
           0.00000000e+00 +0.00000000e+00j],
        [  0.00000000e+00 +0.00000000e+00j,
           0.00000000e+00 +0.00000000e+00j,
           0.00000000e+00 +0.00000000e+00j,
           0.00000000e+00 +0.00000000e+00j,
           0.00000000e+00 +0.00000000e+00j]])
 >>>
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11248#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to