Inverse and cache matrix