In mathematics and computer science, the syntactic monoid M ( L ) {\displaystyle M(L)} of a formal language L {\displaystyle L} is the smallest monoid that recognizes the language L {\displaystyle L} .