Like any pronoun, relative pronouns
are substituted for nouns and other pronouns that functions as subjects or objects in a sentence. Relative pronouns are mostly used when combining sentences in which a word or phrase is repeated.
The gym was very crowded today.
The gym is closed tomorrow.
The gym, which was very crowded today, is closed tomorrow.
Who / Whom
Use who and whom when referring to beings with consciousness: people, animals (when personified), God, etc.
The man who sold you that book is my teacher.
Use who when the pronoun is the subject of a verb.
(Who is a definite pronoun because the sentence mentions the person in advance.)
Arnold Schwarzenegger is one of the most popular action movie actors.
Use whom when the pronoun is the object of a verb, preposition, or infinitive.
Arnold Schwarzenegger was the Governor of California.
Arnold Schwarzenegger, who is one of the most popular actors, was the Governor of California.
Betty is the president of Bedrock.
Wilma praised Betty at the meeting.
Betty, whom Wilma praised at the meeting, is the president of Bedrock.
Whom replaces Betty, which is the object of the verb "praised".
Sam wondered who
was ringing her doorbell.
(who is the subject of was ringing)
Sam was not sure whom
he could trust with her secret.
(Sam is the subject of trust; whom is the object of trust)
It is safe to use who if the sentence begins with the pronoun.
did you ask?
did you ask? (more formal)
Which / That
Use that when referring to persons, animals, or things in an essential relative clause.
The book that is assigned to me is 400 pages.
Use which when referring to persons, animals, or things in an nonessential relative clause.
We are giving information ("is 400 pages") about a specific book ("the book that is assigned to me"). We limit the focus on that particular book. Without the clause "that is assigned to me" the meaning of the sentence would change.
We can use "which" in the above sentence (although "that" should be preferred).
The book which is assigned to me...
San Francisco, which is a great city in California, is where my brother lives.
After the pronoun "which" we are just giving some additional (nonessential) information about San Francisco.
We cannot use "that" in the above sentence (after the comma).
More Examples on Which vs That
have four legs can learn to hop quickly.
(Limiting the focus on animals with four legs only)
Animals, which breath the same air as us, have existed on Earth for many hundreds of millions of years.
cannot fly, are friendly animals.
(Additional information about cats ("which cannot fly") and the main point "are friendly animals"; there is no certain limitation by the pronoun "which")
The pronoun "who" is preferred in some cases for the above sentences:
Animals, who breath the same air as us, have existed on Earth for many hundreds of millions of years.
Whoever / Whomever
Similar to "who" and "whom" except in an indefinite way:
Someone sold you that book. He/She did not give you the right one.
sold you that book did not give you the right one.
("Whoever" is an indefinite pronoun because the sentence does not mention about the whoever in advance.)
("Whoever" is the subject of the verb sold.)
You sold that book to someone. He/She is probably very unhappy now.
you sold that book to is probably very unhappy now.
("Whomever" is an indefinite pronoun and it is the object of the verb sold.)
Jack is the best in class. I borrowed Jack's notebook.
Jack, whose notebook I borrowed, is the best in class.
Relative Pronouns Exercises 1
Relative Pronouns Exercises 2
Who vs Which Exercise
Who vs Which Exercise 2
Which or Where
Whose vs Of Which vs Of Whom
Adjective (Relative) Clauses