lazy matrix inverse calculation/cache