
Many people learn a simple rule: use that for restrictive clauses and which for nonrestrictive clauses. That guideline can be useful, but it is not a law of English. In standard English, which can appear in a restrictive clause.
This is especially common after a preposition, where that usually cannot appear. For example, The house in which I live is old is fully grammatical. So is The rule by which they work is simple.
In many everyday sentences, that may sound more natural than which in a restrictive clause. For example, many writers would prefer The book that I bought is missing over The book which I bought is missing. But the version with which is still acceptable in many varieties and styles of English.
- Restrictive clause: it identifies which person or thing you mean.
- Which is possible in restrictive clauses.
- That is often preferred in ordinary style.
- After a preposition, which is often the natural choice.
The safest takeaway is simple: which is not banned from restrictive clauses. Style guides may prefer that in some cases, but grammar allows both.

