mkPower function

Take matrix to a power