Skip to content

matrix rank should call echelon_form over *fraction field* #5014

@williamstein

Description

@williamstein

On Sun, Jan 18, 2009 at 6:49 AM, Paul Zimmermann <Paul.Zimmermann@loria.fr> wrote:
>       Hi,
>
> I hit the following:
>
> sage: P.<x> = PolynomialRing(GF(17))
> sage: m = Matrix(P,2,2)
> sage: m.randomize(); m
>
> [ 6*x^2 + 8*x + 12 10*x^2 + 4*x + 11]
> [8*x^2 + 12*x + 15  8*x^2 + 9*x + 16]
> sage: m.rank()
> ...
> NotImplementedError: echelon form over Univariate Polynomial Ring in x over Finite Field of size 17 not yet implemented
>
> Isn't that provided by either GP or Linbox?

Yes, by gp.  I have no idea if it is in Linbox.

sage: gp(m).matrank()
2
sage: pari(m).matrank()
boom -- matrank not wrapped

Somebody *could* implement this by wrapping pari's matrank then doing the conversion and calling it.  Of course, much better would be to do:

sage: m.change_ring(m.base_ring().fraction_field()).rank()
2

which already works. 

I am puzzled that rank doesn't first change base to the fraction field, *then* call echelon form -- it's stupid that it tries to call echelon form over the same base ring, since that is often much harder (e.g., it is Hermite form over ZZ).

William

CC: @orlitzky

Component: linear algebra

Author: Michael Orlitzky

Reviewer: Andrey Novoseltsev

Merged: sage-5.0.beta1

Issue created by migration from https://trac.sagemath.org/ticket/5014

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions