up previous next
LinKerBasis

find the kernel of a matrix

Syntax
LinKerBasis(M: MAT): LIST of RINGELEM
LinKerBasis(L: LIST): LIST of RINGELEM

Description
This function returns a list whose components are lists representing a basis for the kernel of the matrix M or for the solutions of the linear system given by linear polynomials L . Calling the function twice on the same input will not necessarily produce the same output, though in each case, a basis for the kernel is produced.

This function works only on matrices whose entries are in a field (from version CoCoA-5.0.3). The CoCoA-4 function returning a ZZ-basis for the kernel of M is not yet implemented.

Example
/**/  use QQ[x,y,z];
/**/  L := [x+y+z,  y-z];
/**/  LinKerBasis(L);
[[-2,  1,  1]]

/**/  M := mat([[1,2,3,4],[5,6,7,8],[9,10,11,12]]);
/**/  LinKerBasis(M);
[[-1, 2, -1, 0], [-2, 3, 0, -1]]

/**/  K := NewFractionField(NewPolyRing(QQ, "a,b"));
/**/  Use K;
/**/  M := mat([[1,2,3,a],[5,6,7,a*b]]);
/**/  LinKerBasis(M);
[[-1, 2, -1, 0], [(a*b -3*a)/2, (-a*b +5*a)/4, 0, -1]]

See Also