Reduced row echelon form

From Rosetta Code
Revision as of 21:09, 21 January 2009 by rosettacode>Mwn3d (Created, no examples yet)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Reduced row echelon form
You are encouraged to solve this task according to the task description, using any language you may know.

Show how to compute the reduced row echelon form (a.k.a. row canonical form) of a matrix. The matrix can be stored in any datatype that is convenient (for most languages, this will probably be a two-dimensional array). Pseudocode found here may be used, or built-in functions may be used.

For testing purposes, the RREF of this matrix:

1   2   -1   -4
2   3   -1   -11
-2   0   -3   22

is:

1   0   0   -8
0   1   0   1
0   0   1   -2