1
$\begingroup$

I have such a matrix:

[ 2  1 -1   8]
[-3 -1  2 -11]
[-2  1  2  -3]

And I have a programming task, which is explained as following:

You have to implement a function called "to_ref". to_ref (c, cm, r, rm, m). This function transforms rows r to rm of matrix m to row echelon form, given that previous rows are in ref and columns 0 to c-1 of rows r to rm are zeros. Tries to reduce rows.

If I call my function as the following; to_ref (0, 3, 0, 2 m) it gives me the following matrix:

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

I don't know exactly what the question says about. If I can understand the question briefly, I can implement the code. Could you help me for a brief description?

  • 0
    What you need is the Gaussian elimination. Just google how it works.2017-02-28

0 Answers 0