What to Know
Who performs the action of a verb (e.g. “Who sent us this gift?“), while whom receives the action (“We got this gift from whom?“). In grammar terms, that makes who a subject, and whom an object. When following a preposition, whom is the preferred choice (“To whom should we address our thank you note?“).
What You Really Need to Know About 'Who' and 'Whom'
Trust your instincts. The choice between who and whom can sometimes be confusing, and this has always been the case. But English is extremely flexible, and actual usage doesn’t always follow the strict rules of grammar. Our ears are our guides, and there are many constructions (like "Whom did you speak to?" vs. "Who did you speak to?") in which whom may be technically correct but still feel fussy or unnatural. In these cases, it is perfectly standard to use who.
A Detailed Guide for Hardcore Grammar Fans
Whom is both simple and complicated. It is simple in that it is simply the objective case of who, which means that it's the form of who that is in the object position in a sentence. What exactly constitutes the object position in a sentence is where things get complicated.
An object, in grammatical terms, is a noun or noun equivalent (such as a pronoun, gerund, or clause) that receives the action of a verb or that completes the meaning of a preposition—so, for example, sandwich in "They bought a sandwich"; it in "My dog ate it"; apologizing in "an appropriate time for apologizing"; and that it was true in "I was afraid that it was true."
Who is a pronoun, which means that it's used instead of a noun or noun phrase to refer to a noun/noun phrase that has already been mentioned or that does not need to be named specifically. Whom replaces who in spots where that word would receive the action of the verb or complete the meaning of a preposition.
'Who' vs 'Whom' Examples
Let's look at some of the grammatical places who tends to appear and see whether whom ought to go there instead.
Who often functions as an interrogative pronoun, which means that it introduces questions that have nouns as the answer:
Who told my dog about that sandwich?
Who should my dog apologize to?
Both of these sentences sound natural with who, but if we want to know whether whom is the grammarian's choice in either of them, we'll have to determine if each who is in the object position. With questions, the easiest way to do this is to reimagine the question as a statement. "Who told my dog about that sandwich?" becomes "X told my dog about that sandwich," with "X" standing for the unknown divulger of sandwich existence. "X" is the subject of the verb told, since "X" has done the telling, so who is indeed correct.
Reimagining the second question as a statement, "Who should my dog apologize to?" becomes "My dog should apologize to X." "X" is the object of the preposition to, so who should technically be whom: "Whom should my dog apologize to?" (If you don't like the terminal preposition—which is ancient and perfectly grammatical—you may prefer "To whom should my dog apologize?") We'll highlight the preferred versions:
Whom should my dog apologize to?
To whom should my dog apologize?
Relative Pronouns and Subordinate Clauses
Who and whom also frequently function as relative pronouns, which means that they refer to a noun or noun phrase that was mentioned earlier:
The person who told my dog about the sandwich was unhelpful.
The sandwich's owner, who my dog apologized to, requires a replacement sandwich.
Again, some analysis is required to determine if who here is in the object position and should therefore technically be whom. Relative pronouns introduce subordinate clauses, a subordinate clause being a group of words that has a subject and predicate but that doesn't by itself form a complete sentence. In the sentences above, the subordinate clauses are "who told my dog about the sandwich" and "who my dog apologized to." To determine whether whom is the preferred pronoun, we need to figure out if the noun or noun phrase that who refers to is in the object position or not. We'll replace who with the noun/noun phrase it refers to, and split the whole thing into two sentences for clarity:
The person told my dog about the sandwich.
The person was unhelpful.
In "The person who told my dog about the sandwich was unhelpful," who refers to "the person," which is the subject of both predicates: "told my dog about the sandwich" and "was unhelpful." Therefore, who is indeed the preferred choice.
Now we'll look at the second relative pronoun example, replacing who with the noun/noun phrase it refers to, again splitting the original into two sentences:
The sandwich's owner requires a replacement sandwich.
The sandwich's owner my dog apologized to.
To make that second one grammatical, we have to do some rearranging, as we did with the questions:
My dog apologized to the sandwich's owner.
In "The sandwich's owner, who my dog apologized to, requires a replacement sandwich," the subject of the verb apologized is "my dog"; who is actually the object of the preposition to, which means that whom is the preferred pronoun here:
The sandwich's owner, whom my dog apologized to, requires a replacement sandwich.
More Tricky Examples
These can be tricky so we'll analyze a few more examples. Plus, this sandwich-dog drama goes deeper.
According to my cat, who was among those witness to the sandwich consumption, the sandwich appeared to have been abandoned.
Is who here correct? Yes: because who, while referring to "my cat," is the subject of the predicate "was among those witness to the sandwich consumption."
My cat, who I was eager to believe, has been known to fib.
How about here? In this case, who refers again to "my cat," but is the object of the verb believe: "I was eager to believe my cat." Therefore the sentence should technically in fact be:
My cat, whom I was eager to believe, has been known to fib.
Sometimes the who/whom is quite buried, syntactically speaking, making analysis especially difficult. See here:
I know that who is on the cat's good side always matters in such cases.
Here, we have the conjunction that introducing a subordinate clause headed by the pronoun who. The first part of our analysis is determining the subject and predicate of the entire sentence. The subject is I; the predicate is everything else. Know is the main verb, and everything else is actually the object of that verb: "I know x."
Now that we know much, we can focus on what who is doing in that very long subordinate clause:
Who is on the cat's good side always matters in such cases.
Who here is a relative pronoun referring to an understood noun/noun phrase along the lines of "which person/creature." Since the sentence is still quite complex, we'll simplify again, finding the main subject and predicate. Stripped down to its most essential meaning, the sentence can be understood as "Who (aka, which creature) always matters," which tells us that the subject is the entire bit "Who is on the cat's good side," and the predicate is "always matters in such cases."
Note, though, that the subject is itself a clause with its own subject and predicate: "Who is on the cat's good side." Who is the subject of the verb is: "X is on the cat's good side." This means that our original sentence is indeed technically correct, despite the fact that who appears in what looks like an object position, after the verb know:
I know that who is on the cat's good side always matters in such cases.
After all that, surely no one can claim that keeping who and whom in their prescribed places is easy to do. In fact, it's about as easy as keeping a dog from eating an unguarded, and ostensibly abandoned, sandwich.