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.




mp=: +/ .*   NB. Matrix multiplication 
pow=: pow0=: 4 : 'mp&x^:y =i.#x'