You knew this would come up sooner or later.
The simple rule is that who is a subject (Who said that?), whom is an object (To whom is that letter addressed?). The verb to be, you will remember, takes a subjective completion (who) rather than an object (whom).
But it’s a bit more complicated than that.
First, who has largely displaced whom in common usage, to the point where the Oxford English Dictionary admits that it is ‘no longer current in natural colloquial speech’. As a result, one usually hears It’s not what you know, it’s who you know. That really should be whom you know (of course), because you need an object for you know.
On the other hand, people sometimes use whom incorrectly because they think it sounds classier: I’ve actually heard May I ask whom is calling? from someone on the other end of the telephone. And those of a certain vintage may know the line from ‘Should I Stay or Should I Go?’ (1982) by The Clash: ‘Exactly whom I’m supposed to be’. Great song, terrible grammar.
Who and whom can also be what’s called relative pronouns: the man who mistook his wife for a hat but the lawyer whom time forgot. Here again, the subject-object distinction governs.
Another complicating point is that whether it’s who or whom depends on the surrounding words. It’s correct to say I’ll talk to whomever but not I’ll talk to whomever will listen. In the second example, that whomever is wrong because you need a subject for the will listen bit – and that has to be whoever. Similarly, it’s Whomever we hire will work hard rather than Whoever … because you need an object for we hire.
Confused? Take comfort in the fact that Shakespeare got it wrong when he wrote Young Ferdinand, whom they say is drowned – as did the King James translators of the Bible with But whom say ye that I am? These examples can be readily fixed if you prune the excess words to get at the core of the sentence: in the example from The Tempest, they say is merely a parenthetical remark, the core being Ferdinand, who is drowned; and the verse from Matthew is, essentially, But who am I?
And while we’re on the subject, don’t confuse who’s and whose. Who’s is short for who is, as in Who’s who? Whose, on the other hand, is a relative pronoun: Whose book is this?
(And it’s not Who’s whom? – again because the verb to be takes a subjective completion (who, in this instance) rather than an object.)
Week after next: all well and good