Cayley hamilton theorem and inverse