created matrix inverse cache functions