Commas separate parts of a sentence or set off words or phrases from the rest of a sentence.
There are 4 main uses of commas in sentence construction. Using a comma in these four cases adds clarity to your writing, but using commas where they're not needed will cause confusion.
1) Commas in a series tells your reader that you are providing a list. Your reader may be confused otherwise. For example:
Wrong - We elect official representatives: a president, vice-president, secretary and treasurer. (How many were elected? 3 or 4?)
Right - Her house was decorated in shades of green, blue, and purple. (a list of 3 colors)
2) Commas with coordinating conjunctions tells your reader that you are discussing two related sentences, not just two things.
When combining sentences into a compound sentence, you need a comma before the coordinating conjunction or FANBOY. For example:
I like peanut butter, and I like jelly.
He eats macaroni, but he won't eat cheese.
BUT when combining two nouns or verbs, you don't need a comma. For example:
I like peanut butter and jelly.
He eats macaroni or cheese but not both.
3) Commas after introductory elements tells your reader what is introduction and what is the main point. For example:
In the back of the room, two kids whispered and giggled. (Two kids whispered is the main point; in the back just describes where.)
Slipping and sliding, the car inches slowly across the wet roads. (The car inches is the main point; slipping just describes how.)
3A) A special kind of introductory element - the dependent clause of a complex sentence.
If the subordinating conjunction comes at the beginning of the sentence, use a comma comes at the end of the dependent clause.
Wrong – Even though I would rather go to the lake I went to the library to study.
Right – Even though I would rather go to the lake, I went to the library to study.
If the subordinating conjunction comes in the middle or at the end of the sentence, no comma is required.
Wrong – School is not all about studying, since there are lots of clubs and fun activities on campus.
Right – School is not all about studying since there are lots of clubs and fun activities on campus.
4) Non-essential elements may be important description, but they are not essential to the construction of a sentence. Commas are used to set off non-essential elements and indicate which parts of the sentence are extra description. If you can remove the element without creating a question, then it is non-essential. For example:
Essential element - Students who play sports must have a good GPA. (Which students must have a good GPA?)
Non-essential elements -
The teacher, who plays flute, enjoys music. (Any teacher enjoys music, not just flute players.)
Each package, however, contained a broken vase. (However is sometimes used to join sentences but can also act as an aside. Note the comma both before and after.)
I subscribe to the Pine Log, which has great articles on ecological issues. (Non-essential elements can come at the end of a sentence.)
Other uses of commas provide clarity in details:
1) Commas separate two or more adjectives:
The girl was very fond of her little, fluffy, black kitties.
2) Commas in dates, addresses, place name, and long numbers:
1600 Pennsylvania Ave., Washington, D.C., is where the White House is located.
July 4, 1776, is when the Declaration of Independence was signed.
I won 1,000,000 dollars in the Texas Lottery!
3) Commas set off a direct quotation from the rest of the sentence:
My mother used to tell me, "What goes around comes around."
"Come live with me and be my love," quoted the romantic young lumberjack.