added matrix trace
added mat_exponent