Update matrix.cpp

Updated print function, added nullspace function, added simple build function (which has a bug in it).