improve matrix example, add matrix exp and other functions