Over the last 200 years, the pronoun whom has been on a steady decline. Despite its waning use in speech and ongoing speculation about its imminent extinction, whom still holds a spot in the English language, particularly in formal writing. Understanding when and how to use this pronoun can set your writing apart.
What’s the difference between whom and who?
Whom is often confused with who. Who is a subjective-case pronoun, meaning it functions as a subject in a sentence, and whom is an objective-case pronoun, meaning it functions as an object in a sentence. Who, like I, he, she, and they, performs actions (as in “Who rescued the dog?”). Who is doing the rescuing in this sentence.Whom, like me, him, her, and them, is acted on (as in “Whom did you see?”) Whom is being seen here, not doing the seeing. Whom more commonly appears when it follows a preposition, as in the salutation “To whom it may concern.” Does it concern he? No. Does it concern him? Yes.
How do you decide to use who or whom?
When in doubt, substitute him (sometimes you’ll have to rephrase the sentence) and see if that sounds right. If him is OK, then whom is OK. If the more natural substitute is he, then go with who. For example: “You talked to whom?” It would be incorrect to say “You talked to he?”, but saying “You talked to him?” makes grammatical sense.
All of that said, in informal speech and writing, speakers will often opt for who where whom has traditionally been used. This choice sounds more natural and less formal to most native English speakers.
Link: https://www.dictionary.com/e/whom-vs-who/