set and get matrix and inverse of matrix