noun word-forming element, "that which is written or marked," from Greek gramma "that which is drawn; a picture, a drawing; that which is written, a character, an alphabet letter, written letter, piece of writing;" in plural, "letters," also "papers, documents of any kind," also "learning," from stem of graphein "to draw or write" (see -graphy). Some words with it are from Greek compounds, others are modern formations. Alternative -gramme is a French form.
From telegram (1850s) the element was abstracted by 1959 in candygram, a proprietary name in U.S., and thereafter put to wide use as a second element in forming new commercial words, such as Gorillagram (1979), stripagram (1981), and, ultimately, Instagram (2010). The construction violates Greek grammar, as an adverb could not properly form part of a compound noun. An earlier instance was the World War II armed services slang latrinogram "latrine rumor, barracks gossip" (1944).
suffix forming almost all Modern English plural forms of nouns, gradually extended in Middle English as -es from Old English -as, the nominative plural and accusative plural ending of certain "strong" masculine nouns (such as dæg "day," nominative/accusative plural dagas "days"). The commonest Germanic declension, traceable back to the original PIE inflection system, it is also the source of the Dutch -s plurals and (by rhotacism) Scandinavian -r plurals (such as Swedish dagar).
Much more uniform today than originally; Old English also had a numerous category of "weak" nouns that formed their plurals in -an, and other strong nouns that formed plurals with -u. Quirk and Wrenn, in their Old English grammar, estimate that 45 percent of the nouns a student will encounter will be masculine, nearly four-fifths of them with genitive singular -es and nominative/accusative plural in -as. Less than half, but still the largest chunk.
The triumphs of -'s possessives and -s plurals represent common patterns in language: using only a handful of suffixes to do many jobs (such as -ing), and the most common variant squeezing out the competition. To further muddy the waters, it's been extended in slang since 1936 to singulars (such as ducks,sweets,babes) as an affectionate or diminutive suffix.
Old English single-syllable collectives (sheep, folk) as well as weights, measures, and units of time did not use -s. The use of it in these cases began in Middle English, but the older custom is preserved in many traditional dialects (ten pound of butter; more than seven year ago; etc.).