Ask Your Question

sunqingyao's profile - activity

2019-02-09 00:48:11 +0200 received badge  Notable Question (source)
2018-06-17 14:50:01 +0200 received badge  Popular Question (source)
2016-12-01 01:10:03 +0200 received badge  Scholar (source)
2016-12-01 01:02:47 +0200 received badge  Supporter (source)
2016-11-30 16:40:16 +0200 received badge  Student (source)
2016-11-30 16:07:01 +0200 asked a question echelon_form not giving reduced echelon form

According to the document(emphasis mine):

echelon_form(algorithm='default', cutoff=0, **kwds)

Return the echelon form of self.

OUTPUT:

The reduced row echelon form of self, as an immutable matrix.

Here is what I was doing:

sage: A = Matrix([[1,0,3,1,2],[-1,3,0,-1,1],[2,1,7,2,5],[4,2,14,0,6]])
sage: A.echelon_form()

[1 0 3 1 2]
[0 1 1 0 1]
[0 0 0 4 4]
[0 0 0 0 0]

While the result is in row echelon form, it's not in reduced row echelon form. What I expect is something like this:

[1 0 3 0 1]
[0 1 1 0 1]
[0 0 0 1 1]
[0 0 0 0 0]

Also, if this is merely a documentation bug, how can I get the reduced row echelon form of a matrix?