Gerunds and infinitives both belong to the grammar category known as verbals, words that are technically verbs but function as other parts of speech. Instead of illustrating action or states of being, they may work as nouns or describing words, either by themselves or with a group of words, creating gerund or infinitive phrases. Although they have similarities to each other, knowing the differences also helps writers use them correctly.
Gerunds are words that end in -ing and function as nouns. Examples include words like "walking" and "seeing." Writers use gerunds as subjects, as in, "Walking is good exercise"; direct objects, as in, "He loves walking"; subject complements that appear after a linking verb, as in the sentence, "The best exercise is walking"; or objects within prepositional phrases, as in, "He lost all that weight by walking." If a word ends with -ing but doesn't show action or describe another word -- as in "walking stick" -- it's a gerund.
Infinitives occur when writers use the word "to" followed by the dictionary form of a verb. Rather than functioning as verbs, infinitives can work as nouns, taking the roles of subjects, as in, "To walk is my goal"; direct objects, as in the sentence, "He loved to walk after work"; and subject complements, as in, "His favorite exercise is to walk." Infinitives also work as describing words, taking the place of adjectives modifying nouns, as in, "His desire to walk was strong," or adverbs modifying verbs: "He struggles to walk."
Since both gerunds and infinitives can be used as nouns, writers sometimes experience confusion about which to choose. Some important differences in usage exist. For instance, gerunds may serve as objects of prepositions, but infinitives cannot. "He lost all that weight by walking" illustrates correct use of the gerund "walking" as the object of the preposition "by," while "He lost all that weight by to walk" is incorrect since it uses the infinitive "to walk" as the object of the preposition.
Gerunds typically make more factual statements, as in, "Walking is his favorite way to get home," which asserts a verifiable truth. Infinitives, on the other hand, represent ideas such as presumptions or suppositions. For instance, "He wanted to walk home" indicates his intention to walk rather than a statement of fact. Writers may only follow some verbs with gerunds, including "discuss," "suggest," "practice" and "finish," while other verbs use only infinitives after them, including "agree," "propose," "attempt" and "promise."