Skip to content

gauss_jordan_elimination #1125

@ugoertz

Description

@ugoertz

I am confused about the function gauss_jordan_elimination. If I feed matrix([0, 1], [1, 0]) into this function I would expect to get the unit matrix of size 2, but instead Numbas complains that "this matrix is not invertible" (even though, in this case, it obviously is invertible ...).

In fact, in

if(f==0) {
it checks whether it can divide by the upper left entry and stops when this is not possible. Shouldn't it swap rows in that case (and also, in general, allow for the first column being zero)?

Best regards, Ulrich

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions