add matrix object and cached computation of inverse