#18365: Definition of LU descomposition of a matrix depends on the base ring
------------------------------+----------------------------
   Reporter:  tmonteil        |            Owner:
       Type:  defect          |           Status:  new
   Priority:  major           |        Milestone:  sage-6.7
  Component:  linear algebra  |         Keywords:
  Merged in:                  |          Authors:
  Reviewers:                  |  Report Upstream:  N/A
Work issues:                  |           Branch:
     Commit:                  |     Dependencies:
   Stopgaps:                  |
------------------------------+----------------------------
 As reported on [http://ask.sagemath.org/question/26713/lu-descomposition-
 for-a-matrix/ this ask question], there is an inconsistency in the
 definition of the LU decomposition of a matrix depending on its base ring.
 If a matrix `A` belongs to `ZZ`, `QQ`, `AA`, `QQbar`, `A.LU()` returns a
 triple `(P,L,U)` such that `A=PLU`. If a matrix `A` belongs to `RDF`,
 `A.LU()` returns a triple `(P,L,U)` such that `PA=LU`. For example:

 {{{
 sage: A = random_matrix(ZZ,4)
 sage: A.LU()
 (
 [0 1 0 0]  [    1     0     0     0]  [   72    -4   -38     0]
 [0 0 1 0]  [    0     1     0     0]  [    0    -1    -2    10]
 [1 0 0 0]  [ 1/36   8/9     1     0]  [    0     0  17/6 -80/9]
 [0 0 0 1], [-1/36   1/9    -1     1], [    0     0     0   -17]
 )
 sage: B = A.change_ring(RDF)
 sage: B.LU()
 (
 [0.0 0.0 1.0 0.0]
 [1.0 0.0 0.0 0.0]
 [0.0 1.0 0.0 0.0]
 [0.0 0.0 0.0 1.0],

 [             1.0              0.0              0.0              0.0]
 [             0.0              1.0              0.0              0.0]
 [ 0.0277777777778   0.888888888889              1.0              0.0]
 [-0.0277777777778   0.111111111111             -1.0              1.0],

 [          72.0           -4.0          -38.0            0.0]
 [           0.0           -1.0           -2.0           10.0]
 [           0.0            0.0  2.83333333333 -8.88888888889]
 [           0.0            0.0            0.0          -17.0]
 )


 sage: B.LU()[0] == A.LU()[0]
 False
 sage: B.LU()[0] == A.LU()[0].transpose()
 True
 sage:
 }}}

 The aim of this ticket is to fix this inconsistency and choose a common
 definition for all rings.

--
Ticket URL: <http://trac.sagemath.org/ticket/18365>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to