matrix exponential function

concurrent and serial implementation