move matrix out of tests (oops)
only work on full row-rank problems