We construct a 10 by 10 matrix X of integers.
> M := MatrixRing(IntegerRing(), 10); > M; Full Matrix Algebra of degree 10 over Integer Ring > X := M ! [i+2*j: i,j in [1..10]]; > X; [ 3 5 7 9 11 13 15 17 19 21] [ 4 6 8 10 12 14 16 18 20 22] [ 5 7 9 11 13 15 17 19 21 23] [ 6 8 10 12 14 16 18 20 22 24] [ 7 9 11 13 15 17 19 21 23 25] [ 8 10 12 14 16 18 20 22 24 26] [ 9 11 13 15 17 19 21 23 25 27] [10 12 14 16 18 20 22 24 26 28] [11 13 15 17 19 21 23 25 27 29] [12 14 16 18 20 22 24 26 28 30]We set V to be the length 10 vector (5, 4, 3, 5, 6, 4, 3, 7, 6, 5) and then set W to be VX.
> V := RSpace(IntegerRing(), 10) ! [5, 4, 3, 5, 6, 4, 3, 7, 6, 5]; > V; (5 4 3 5 6 4 3 7 6 5) > W := V * X; > W; ( 373 469 565 661 757 853 949 1045 1141 1237)Now we find a solution S of the equation SX = W together with the kernel K of X.
> S, K := Solution(X, W); > S; (-181 229 0 0 0 0 0 0 0 0) > K; RSpace of degree 10, dimension 8 over Integer Ring Echelonized basis: ( 1 0 0 0 0 0 0 0 -9 8) ( 0 1 0 0 0 0 0 0 -8 7) ( 0 0 1 0 0 0 0 0 -7 6) ( 0 0 0 1 0 0 0 0 -6 5) ( 0 0 0 0 1 0 0 0 -5 4) ( 0 0 0 0 0 1 0 0 -4 3) ( 0 0 0 0 0 0 1 0 -3 2) ( 0 0 0 0 0 0 0 1 -2 1)Finally we note that V - S is in the kernel as expected.
> V - s in K; true
Next Group: Smith form of integer matrices Previous Group: Z-modules
Up: Z-modules