Do I need a comma before "which" in the middle of a sentence?

I'm constantly getting confused with punctuation. For example: "I bought a book, which was lying on the shelf" or "I bought a book which was lying on the shelf"? I saw somewhere that a comma isn't always needed, but I can't figure out the rule.

5 answers

A comma is needed if the subordinate clause with "which" adds explanation or clarification to a word but doesn't restrict its meaning. In your example it's correct: "I bought the book that was lying on the shelf" - a comma is needed. Here the clause simply adds information about the book, and you can remove it without losing the sense.

But if you wrote "I bought the book that I liked," a comma goes there too - this is an explanatory subordinate clause. You write without a comma only in rare cases when the subordinate clause *restricts* the meaning - for example, "Books that I love" might mean a specific set of books, different from others. But even here the modern standard often requires a comma, so better not risk it.

Here's an easier way to remember: if a subordinate clause comes after a noun and starts with "that/which" - put a comma before it. Exceptions are rare, and in normal writing you'll almost never go wrong if you always do this.

The rule is simple: you need a comma before "which" if the relative clause explains a word but doesn't restrict it - meaning the information in that clause is additional, not clarifying. In your example "I bought the book, which was lying on the shelf" - the comma is correct because you already know which book you're talking about, and the part about the shelf is just extra information.

You don't use a comma when the clause with "which" narrows down the set of objects. For example: "I bought the book which was on the recommendations list" - there are lots of books, but you're choosing the specific one that's on the list. That's when you skip the comma. I once helped a friend with a presentation, and he wrote "We use the methods which produce results" - I pointed out no comma because there are tons of methods, but you're talking about the specific ones that actually work. That's the difference.

The main thing is to distinguish between two types of subordinate clauses with "which". If you can remove the part with "which" and the main clause still makes complete sense, you need a comma. If you can't remove it because that part clarifies which specific object you're talking about, there won't be a comma.

In your example "I bought a book, which was lying on the shelf" - the sentence makes sense even without the second part. You bought a book, period. And the information about the shelf is extra explanation. You need a comma here. But if you say "I bought a book which you recommended to me" - there's no comma here, because without the clarification "which you recommended to me" it's unclear which book you mean.

It's simple to check: try mentally removing the subordinate clause. If the main clause is still logical and complete, you need a comma. If the meaning falls apart or becomes unclear without the subordinate clause, there's no comma.

Check yourself like this: can you remove the part with "which" and the sentence will still make sense? If yes - you need a comma (it's just additional information). If you can't remove it because the meaning gets lost - there's no comma. In your example, the comma is correct: "I bought the book, which was lying on the shelf" sounds like just information about the book. But "I bought the book which costs less" - the first version specifies which book exactly, so no comma is needed.

natalya_ivanova asker Thanks, but I got even more confused - in your last example, both versions sound the same to me. Is it a descriptive or restrictive clause?

Have you tried just removing the subordinate clause and seeing what's left? In your example "I bought a book" is a complete statement, so the part about the shelf becomes additional information and requires a comma. But if you'd written "I bought a book that was the last one in the store" - that also requires a comma by the same principle. Where the previous answers go wrong: they talk about "restrictive vs. non-restrictive," but it's simpler to just think about whether this information is necessary for the meaning of the main sentence or not. If the sentence is complete without the subordinate clause - use a comma.

natalya_ivanova asker Thanks, I got the principle! But what if the information in the subordinate clause actually specifies which book I'm talking about - can't leave it out without the clause?

Your answer

Log into answer.