Ask Your Question

sunqingyao's profile - activity

2019-02-08 17:48:11 -0600 received badge  Notable Question (source)
2018-06-17 07:50:01 -0600 received badge  Popular Question (source)
2016-11-30 18:10:03 -0600 received badge  Scholar (source)
2016-11-30 18:02:47 -0600 received badge  Supporter (source)
2016-11-30 09:40:16 -0600 received badge  Student (source)
2016-11-30 09:07:01 -0600 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?