cached matrix inverse computation