One could argue that most writers confuse these terms as an error of spelling rather than usage—all the more reason to distinguish between them carefully and avoid an embarrassing, sloppy habit. The distinction is simple: "complement" (note the "e" in the middle) means "something that completes"; "compliment" (note the "i" in the middle) means "to express praise" or "thanks to":
Spelling "complement" correctly is especially important in fields such as biochemistry, where "complement components" and "complement pathways" are cited frequently.
Self-Study
For a nifty and extensive look at how to use "complement" vs "compliment," visit this website:
"Complement vs. Compliment: What’s the Difference?" at grammarlyblog