Previous Up Next

5.35.7 Row reduction to echelon form in ℤ/pℤ: Rref

In Xcas mode, Rref is simply the inert form of rref; namely, it returns rref without evaluating it. (See Section 5.56.3.) In Maple mode, the Rref command can additionally be used in conjunction with mod to find the reduced row echelon form of a matrix whose elements are in ℤ/pℤ.

Example

Solve in ℤ/13ℤ:

⎧
⎨
⎩
          x +   2 · y=9 
       3 · x +10 · y=0

Input (in Xcas mode):

Rref([[1,2,9] mod 13,[3,10,0] mod 13])

Output:

rref⎛
⎜
⎜
⎜
⎝
⎡
⎢
⎢
⎢
⎣
1%132%13
⎛
⎝
−4⎞
⎠
%13
3%13
⎛
⎝
−3⎞
⎠
%13
0%13
⎤
⎥
⎥
⎥
⎦
⎞
⎟
⎟
⎟
⎠

To actually get the reduced echelon form, you can enter:
Input:

eval(ans())

Output:

⎡
⎢
⎣
1%130%133%13
0%131%133%13
⎤
⎥
⎦

and conclude that x=3%13 and y=3%13.
Input (in Maple mode):

Rref([[1,2,9],[3,10,0]] mod 13)

Output:

⎡
⎢
⎣
103
013
⎤
⎥
⎦

and again conclude that x=3%13 and y=3%13.


Previous Up Next