create a special matrix that computes the inverse and caches it