Programming assignemnt 2: A cachaeble matrix inverse function