The kernel to the left of the matrix Nm = {{ -1, 1, -1, 1, 1, 0}, {2, -2, 0, 0, -1, 1 }, {0, 0, -1, 1, 1, 0 }, {0, 0, 1, -1, 0, -1}, {0, 0, 0, 0, -1, 1}}; may be generated by {0, 0, 1, 1, 1},{2, 1, 0, 2, 1}, as easily checked {0, 0, 1, 1, 1} . Nm {2, 1, 0, 2, 1} . Nm I need a script which finds a positive (nonnegative) basis for arbitrary integer valued matrix. For now, I am working with tx = Table[x[i], {i, 5}];Solve[Thread[tx . Nm == 0], tx] and then searching with pencil for an answer. I tried things like adding positivity conditions Solve[Join[Thread[tx . Nm == 0], Thread[tx >= 0]], tx] or FindInstance[Join[Thread[tx . Nm == 0], Thread[tx > 0]], tx, 2] but they don't seem to advance me, so I'm asking for help. Here's a second example, where all the methods offered are in difficulty ST = {{-1, 0}, {0, 1}, {1, -1}, {-2, 1}, {1, -1}} nu=NullSpace[ST // Transpose] The null-space contains two positive vectors out of three (*{{1, 1, 0, 0, 1}, {-2, -1, 0, 1, 0}, {1, 1, 1, 0, 0}}*) The HermiteDecomposition[nu][[2]] (*{{1, 0, 0, -1, -1}, {0, 1, 0, 1, 2}, {0, 0, 1, 0, -1}}*) discovers a third vector. The script I offered has 5 arbitrary constants instead of three, and playing around with substituting values yields another answer {0,1,2,1,0}. The problem of offering a script which works always remains open :)