Thank you so much! The math example are really helpful for decoding the complicated word "COMPOSITIONALITY" in linguistics haha, at least for me. The ORDER for word combination matters.
Syntax is the structural study of a given language and mostly deals with the sentence structure (word order etc.) while semantics is much related to the meaning of the language at the word level.