For nonzero multivariate polynomials and
with leading monomials
and
and leading terms
and
, their S-polynomial is
The two multiples have the same leading monomial, so their difference cancels it. S-polynomials are used by Buchberger's algorithm to determine whether a set of polynomials is a Gröbner basis.