When starting a sentence with "to", add a comma after the introductory phrase. In mid-sentence, commas are generally unnecessary.
"To" is typically a preposition that has a noun (e.g., "to California") or an infinitive (e.g., "to play") as its object.
When followed by an infinitive, "to" introduces an adverbial infinitive phrase (e.g., "to cut cheese"), and you can use it at the beginning or in the middle of a sentence to express purpose.
To explore the floating market, you need to rent a boat.
You need to rent a boat to explore the floating market.
'To' at the beginning of a sentence
When beginning a sentence with an infinitive adverbial phrase introduced by "to", add a comma after the introductory phrase.
To avoid systematic errors in scientific studies, double check all measurements for accuracy.
To avoid systematic errors in scientific studies double check all measurements for accuracy.
You can omit the comma, however, if the introductory phrase is short (no more than four or five words).
To boost your metabolism exercise more and drink green tea.
'To' in mid-sentence
When using "to + infinitive" in mid-sentence, commas are generally unnecessary.
Use this knife to cut the cheese.
But there are exceptions. For example, use commas to include nonessential information or interrupt the sentence flow:
She used a repellent, to prevent mosquito bites, and went to bed.
When using a series of infinitives, use commas as well.
Follow a workout program to strengthen bones and muscles, help manage weight, and reduce the risk of disease.
Using 'In order to' Instead of 'To'
In formal contexts or written English, we can replace "to" by "in order to" to express purpose.
They forged a partnership (in order to / to) achieve competitive advantage and gain market share from competitors.
Follow the same comma rules with "in order to"
In order to prevent pipe corrosion, add protection to all metals.
What's the difference between "in order to" and "to"? The compound preposition "in order to" is much more common in writing than in speaking. It is also more formal.