Should you precede a subordinate clause with a comma? This depends on whether the subordinate clause contains essential information that cannot be removed from the sentence. If it does, it is not preceded by a comma, and if it doesn’t, it must be preceded by a comma. For example,
I love running, which is something you can do everywhere. [comma required]
If you want to read more about the distinction, you can read my other article on the topic. And why am I telling you all this? Because clauses starting with “whereas”, “while”, “although”, and similar conjunctions are just special cases of this rule. Let’s discuss them in more detail.
The rule of thumb is: When you contrast two things, use a comma. “Whereas” is typically used to contrast two things:
Notice how the clause after “whereas” is a non-essential piece of additional information (“I am very tall” means exactly the same, no matter what the “whereas” clause says).
Note that some authors do not precede “whereas” with a comma, which I find rather unfortunate. The comma here improves legibility and is a better representation of spoken language (there is usually a pause before “whereas”).
“Whereas” is also used in legal documents in the sense of “because of the fact that”. Unless you practice law, you don’t have to worry about this.
“While” is somewhat more complicated because it has two different meanings. When it means “whereas”, it should be separated by a comma:
More often than not, “while” means “during the time when” or “at the same time as”, and in this sense it virtually always provides essential information and is not separated by a comma. Distinguishing between the two meanings is important to make yourself understood. Compare:
My parents died, whereas I was still at school.
Remember: When contrasting two facts, use a comma. When talking about time, don’t use a comma.
“Although” also has two meanings. When it is used to provide supplementary information that partly negates what has been said previously (in which case it can basically be replaced by “but”), you should use a comma:
However, “although” can be used at the beginning of a sentence to introduce a fact that makes the rest of the sentence somewhat surprising, e.g.
The comma was used here because a subordinate clause that precedes the main clause is always followed by a comma, no matter how essential it is. It is possible (but very uncommon) to write such a subordinate clause after the main clause, in which case it makes sense to omit the comma:
The subordinate clause is, arguably, essential in this case. Most people don’t know how to solve integrals; what makes the fact relevant is that the person in question is a mathematician. However, there are usually better ways to express the same idea, such as: