[back] [prev] [next] [index] [root]

 


MatKernel

Returns a basis for the kernel of the given matrix.

Syntax:

K := MatKernel(M);
K := MatKernel(M, d);

matrix
  K  
matrix
  M  
integer
  d  

Description:

Let M be a m \times n-matrix. The MatKernel routine computes a basis K for the linear subspace { x = (x|1, … ,x|m) : x cdot M = (0, … ,0) }. . If a second parameter d is used, the kernel over Z / dZ will be computed. The used algorithm is based on BuNei1.


Example:

Compute the kernel of the integer matrix \left(\begin{array}{ccc} 2 & 3 & 4 3 & 4 & 5 4 & 5 & 6 6 & 7 & 8 \end{array}right).

kash> M := Mat(Z,[[2,3,4],[3,4,5],[4,5,6],[6,7,8]]);
[2 3 4]
[3 4 5]
[4 5 6]
[6 7 8]
kash> MatKernel(M);
[ 1  0 -2  1]
[ 0  2 -3  1]



Example:

Compute the kernel modulo 3

kash> MatKernel(M, 3);
[0 2 0 1]
[1 1 1 0]



Example:

Compute kernel

kash> o := Order(Z, 2,3);;
kash> a := Elt(o, [1,2/19]);;
kash> one := Elt(o, [1,0]);;
kash> m := Mat(o, [[a,2*a,3*a^2],[a^2,2*a^2,3*a^3],[one,2*one,3*a]]);
[[19, 2] / 19 [38, 4] / 19 [1119, 228] / 361]
[[373, 76] / 361 [746, 152] / 361 [22629, 6570] / 6859]
[1 2 [57, 6] / 19]
kash> k := MatKernel(m);
[1 0 [-19, -2] / 19]
[0 1 [-373, -76] / 361]
kash> k*m;
> [0 0 0]
[0 0 0]


<- back[back] [prev] [next] [index] [root]