I'm trying to write a program in which one part is related to calculation of kernel of a matrix. Its output and expected output are different. For example,
A = [[1, 0, 1], [1, 0, 0], [0, 1, 1], [0, 1, 0], [0, 0, 1], [-1, 0, 0], [0, 0, -1], [0, -1, 1], [0, -1, 0], [-1, 0, 1]]
A is the matrix whose kernel is wanted.
When I calculate its kernel with some programs they give output only $0$, my program is as well. But, when I try to calculate its kernel some others, like SAGE, give output,
1  0  0  0  0  0  0 -2  2  1
0  1  0  0  0  0  0 -1  1  1
0  0  1  0  0  0  0 -1  2  0
0  0  0  1  0  0  0  0  1  0
0  0  0  0  1  0  0 -1  1  0
0  0  0  0  0  1  0  1 -1 -1
0  0  0  0  0  0  1  1 -1  0
The above one is what I expect as output. What is the point that I may overlook?
Here is my procedure to calculate the kernel in my program,
A.transposeInPlace();
FullPivLU<MatrixXf> lu(A);
MatrixXf A_null_space = lu.kernel();
A_null_space.transposeInPlace();
But in that way, I get 0, but SAGE gives the above matrix that actually I expect.
 
 