Complex sentences are sentences that have two clauses. There can be two independent clauses (each having a subject and predicate), or an independent clause and dependent clause (missing a subject or predicate). Whether a comma is used between them depends on the types and positions of the clauses.
An independent clause is a clause that can stand on its own as a sentence.
Often, two independent clauses can be joined with a conjunction, such as and, but, or, so, yet, or any other conjunction. A comma is placed right before the conjunction in this type of complex sentence.
A dependent clause is a clause that cannot stand as a sentence in its own right, such as before I left the parking lot. When a complex sentence contains a dependent clause like this one, a comma is not used unless the dependent clause comes before the independent clause.
If the positions of the clauses were reversed, with the independent clause first, there would be no comma in the sentence.
Unnecessary Commas in Complex Sentences
Generally, if the dependent clause comes second in a complex sentence, a comma is not used.
The second clause, because there is nothing to eat in the house, is dependent; there is no need to use a comma between the two clauses.
In the last example, the dependent clause was used before the independent clause, so a comma was placed in this complex sentence.
This sentence contains an unnecessary comma.
Exception: If the sentence is confusing or ambiguous without a comma, one may be used for purposes of clarity.
There are two ways to interpret this sentence. One possibility is that Louise did call Jeff, and her reason for calling was not that she was angry. The other possibility is that Louise did not call Jeff, and the reason she didn’t call is that she was angry. A comma removes the ambiguity.