Opened 4 years ago

Last modified 3 years ago

#23715 new defect

most matrices ignore transformation=true in echelon form

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-8.1
Component: linear algebra Keywords: days88, echelon_form, matrix
Cc: jipilab, slelievre Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by vdelecroix)

Fine for integers

sage: matrix(ZZ,2,range(4)).echelon_form(transformation=True)
(
[2 0]  [-3  1]
[0 1], [ 1  0]
)

But false for all (?) others

sage: UCF = UniversalCyclotomicField()
sage: matrix(UCF,2,range(4)).echelon_form(transformation=True)
[1 0]
[0 1]
sage: matrix(QQ,2,range(4)).echelon_form(transformation=True)
[1 0]
[0 1]
sage: matrix(GF(2),2,range(4)).echelon_form(transformation=True)
[0 1]
[0 0]

Change History (3)

comment:1 Changed 4 years ago by vdelecroix

  • Description modified (diff)
  • Summary changed from rational matrices ignore transformation=true in echelon form to most matrices ignore transformation=true in echelon form

comment:2 Changed 3 years ago by slelievre

  • Cc slelievre added
  • Keywords echelon_form matrix added

Related: the documentation for rref (reduced row-echelon form) claims that

All arguments are passed on to :meth:echelon_form.

but it is not the case; in particular transformation=True is not passed on!

sage: a = matrix(ZZ, [[1, 2, 3], [3, 2, 1], [0, 1, 0]])
sage: a.rref(transformation=True)
[1 0 0]
[0 1 0]
[0 0 1]
sage: a.echelon_form(transformation=True)
(
[1 0 3]  [ 1  0 -2]
[0 1 0]  [ 0  0  1]
[0 0 8], [ 3 -1 -4]
)

comment:3 Changed 3 years ago by slelievre

Is it maybe the case that transformation=True is honored by echelon_form only if the base ring is not a field?

Note: See TracTickets for help on using tickets.