linearity for matchings