Update matrix.h

New matrix operators and fixed memory leaks.  Added singular-ness checks and start of determinant function.