Most programming languages have a built-in implementation of exponentiation for integers and reals only.



Task

Demonstrate how to implement matrix exponentiation as an operator.




> M := <<1,2>|<3,4>>;
> M ^ 2;