Comma after introductory words, phrases, clauses: unacceptable, obligatory or optional?

I am no native speaker and always confused about the comma in introductory phrases, in particular in prepositional phrases. Is there any hard rule when a comma must be set? If I make a google search for certain phrases, I often find both variants. Typical examples where I am not sure whether a comma must be set are:

  • First[ly][,] I must phone mother

  • In this case[,] we must...

  • For simple problems[,] the algorithm...
  • From Lemma 1.2[,] we obtain...
  • For a typical user[,] the algorithm...
  • In our theory[,] we...
  • A dark line on the horizon[,] the mountain range we were headed for seemed somehow not as threatening as when we had started out on the trip.
  • Avidly reading her novel[,] Jane did not notice that her stop was approaching.
  • To be sure[,] it is not easy to see a solution.
  • When you get to Rome[,] give me a ring.

Solution 1:

Larry Trask’s advice in cases like this is to see what happens if you remove from the sentence the words marked off by the comma. If you are left with a meaningful sentence, then the comma is appropriate. If no meaningful sentence remains, you don’t need the comma.

Solution 2:

Comma sense—a fun-damental guide to punctuation suggest to use the comma to set off introductory elements, which are reported to be:

  • an adverb: First, I need to call my girlfriend.
  • a prepositional phrase: After dinner, let's go to see a movie.
  • an appositive: A stumbling giggler, Lumpy was hardly prepared for the relay baton suddenly being thrust upon him.
  • a participial phrase
  • an infinitive phrase: To be honest, I think you are over-reacting.
  • a dependent clause: If you are going to leave this room, I am not going to call you anymore.

This is an example used by that guide to show what happens if you don't use the comma after an introductory element:

After retiring my wife, my parents, the kids, and I plan to travel around the country.

Solution 3:

After Understanding English Grammar by Martha Kolln, grammar.ccc.commnet.edu ... advises the following:

Commas and Introductory Elements

  1. When a sentence begins with an adverbial clause, put a comma after it.

Although we had reviewed the film twice before, we never noticed these details about the shooting.

As the day drew to a smoky end, the firefighters put out the last of the embers.

[To go beyond the basic improvements that we have already started work on, we will need to raise more funds.]

  1. It is permissible, even commonplace, to omit a comma after most brief introductory elements — a prepositional phrase, an adverb, or a noun phrase:

Yesterday afternoon we sat around waiting for Bill to arrive.

By evening we had become impatient.

Jauntily he walked into the hall.

[To go further we will need to raise more funds.]

  1. When a prepositional phrase expands to more than three words, say, or becomes connected to yet another prepositional phrase, the use of a comma will depend on the writer's sense of the rhythm and flow of the sentence.

After his nap Figueroa felt better.

After his long nap in the backyard hammock, Figueroa felt better.

  1. When an introductory adverbial element seems to modify the entire sentence and not just the verb or some single element in the rest of the sentence [ie this is a pragmatic marker rather than a true adverbial function] put a comma after it.

Fortunately, no one in the bridal party was in that car.

Sadly, the old church was completely destroyed.

On the other hand, someone obviously was badly injured.

[To be honest, I think that the Government has relaxed lockdown regulations too early.]

  1. Don't allow a brief introductory element to merge with something following it in a way that can confuse your reader. Try reading the following sentences without their commas:

Until the spring course lists will not be published.

Until the spring, course lists will not be published.

..................

Inside the gym was brightly lighted and clean.

Inside, the gym was brightly lighted and clean.

  1. When a sentence begins with an Absolute Phrase or an adverbial Infinitive Phrase, put a comma after it. (If the infinitive phrase is acting as a noun and is the subject of the sentence, be careful not to put a comma between the subject and its verb: "To believe in one's self is a good thing.")

Their headpieces flapping wildly about their ears, the priestesses began their eerie chant.

To escape with our lives, we would have to run for the exits.