Ask Your Question
1

How to get the left matrix that was used to obtain reduced row echelon form?

asked 2018-09-10 10:25:45 -0500

Jules gravatar image

Hi all.

I have a matrix A and would like to determine a matrix E such that E*A = R, where R is the reduced row echelon form of the matrix A. I just know the command R = A.rref(). But I don't know how to get E (my stupid solution is to compute the inverse of the pivot columns of A ...). Is there e.g. an argument such that A.rref() also outputs E?

Thanks a lot, Julian

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-09-10 11:31:53 -0500

slelievre gravatar image

You can use the echelon_form method with transformation=True.

Example:

sage: A = Matrix([[1, 2, 3], [3, 2, 1], [1, 1, 1]])
sage: A
[1 2 3]
[3 2 1]
[1 1 1]
sage: A.echelon_form(transformation=True)
(
[ 1  0 -1]  [ 0  1 -2]
[ 0  1  2]  [ 0 -1  3]
[ 0  0  0], [ 1  1 -4]
)
edit flag offensive delete link more

Comments

Thanks for your quick answer. However, it does not really what I would like to have :-/ Am I doing something wrong or does It not work if A is over GF(q). (gives A.echelon_form(transformation=True) always reduced row echelon form or just echelon form?)

Thanks :)

Jules gravatar imageJules ( 2018-09-11 09:22:27 -0500 )edit

There are two bugs in Sage regarding this:

  • The method for reduced row echelon form, rref, calls the method echelon_form, and is supposed to pass on the arguments it is given, such as transformation=True, but it does not.

  • The method echelon_form itself does not always honor the request to return the transformation (i.e., the argument transformation=True).

See

slelievre gravatar imageslelievre ( 2018-09-11 17:42:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-09-10 10:25:45 -0500

Seen: 20 times

Last updated: Sep 10