The letter G was introduced in the Old Latin period as a variant of ‹c› to distinguish voiced /ɡ/ from voiceless /k/. The recorded originator of ‹g› is freedman Spurius Carvilius Ruga, the first Roman to open a fee-paying school, who taught around 230 BC. At this time ‹k› had fallen out of favor, and ‹c›, which had formerly represented both /ɡ/ and /k/ before open vowels, had come to express /k/ in all environments. It is the seventh letter in the modern alphabet.
Ruga's positioning of ‹g› shows that alphabetic order, related to the letters' values as Greek numerals, was a concern even in the 3rd century BC. Sampson (1985) suggests that: "Evidently the order of the alphabet was felt to be such a concrete thing that a new letter could be added in the middle only if a 'space' was created by the dropping of an old letter."According to some records, the original seventh letter, ‹z›, had been purged from the Latin alphabet somewhat earlier in the 3rd century BC by the Roman censor Appius Claudius, who found it distasteful and foreign.
Eventually, both velar consonants /k/ and /ɡ/ developed palatalized allophones before front vowels, leading to the situation that is present in today's Romance languages where, ‹c› and ‹g› have different sound values depending on context. Because of French influence, English also has this feature in its orthography.
The modern lower case ‹g› has two typographic variants: the single-story (sometimes opentail) ‹› and the double-story (sometimes looptail) ‹›. The single-story version derives from the majuscule (upper-case) form by raising the serif that distinguishes it from ‹c› to the top of the loop, thus closing the loop, and extending the vertical stroke downward and to the left. The double-story form developed similarly, except that some ornate forms then extended the tail back to the right, and to the left again, forming a closed bowl or loop. The initial extension to the right was absorbed into the upper closed bowl. The double-story version became popular when printing switched to "Roman type" because the tail was effectively shorter, making it possible to put more lines on a page. In the double-story version, a small stroke in the upper-right, often terminating in an orb shape, is called an "ear".
Generally, the two are complementary, but occasionally the difference has been exploited to provide contrast. The 1949 Principles of the International Phonetic Association recommends using for advanced voiced velar plosives (denoted by Latin small letter script G) and for regular ones where the two are contrasted, but this suggestion was never accepted by phoneticians in general, and today ‹› is the symbol used in the International Phonetic Alphabet, with ‹› acknowledged as an acceptable variant.
In English, the letter represents symbol often times used as voiced postalveolar affricate /dʒ/ ("soft G"), as in: giant, ginger, and geology; or a voiced velar plosive /ɡ/ ("hard G"), as in: goose, gargoyle, and game. In some words of French origin, the "soft G" is pronounced as a fricative (/ʒ/), as in rouge, beige, and genre. Generally, ‹g› is soft before ‹e›, ‹i›, and ‹y› in words of Romance origin, and hard otherwise; there are many English words of non-Romance origin where ‹g› is hard regardless of position (e.g. get), and three (gaol, margarine, algae) in which it is soft even before an ‹a›.
Non-Romance languages typically use ‹g› to represent /ɡ/ regardless of position. Amongst European languages Dutch is an exception as it does not have /ɡ/ in its native words, and instead ‹g› represents a voiced velar fricative /ɣ/, a sound that does not occur in modern English. Faroese uses ‹g› to represent /dʒ/, in addition to /g/, and also uses it to indicate a glide. German, however, is notable for its sparse use of ‹g› to represent a pronunciation (to represent the sounds /ʒ/, or /dʒ/) regardless of its position within German words.)
While the soft value of ‹g› varies in different Romance languages (/ʒ/ in French and Portuguese, [(d)ʑ] in Catalan, /d͡ʒ/ in Italian and Romanian, and /x/ in Castilian Spanish, and /h/ in other dialects of Spanish), in all except Romanian and Italian, soft ‹g› has the same pronunciation as the ‹j›.
Several digraphs are common in English. ‹gh› which came about when the letter yogh was removed from the alphabet, and took various values including /ɡ/, /ɣ/, /x/, and /j/. It now has a great variety of values, including /f/ in enough, /ɡ/ in loan words like spaghetti, and as an indicator of a letter's "long" pronunciation in words like eight and night. ‹Gn› with value /nj/ is also common in loanwords, as in lasagna (though initially, as in gnome, the ‹g› is simply silent).
In Italian and Romanian, ‹gh› is used to represent /ɡ/ before front vowels where ‹g› would otherwise represent a soft value. In Italian and French, ‹gn› is used to represent the palatal nasal /ɲ/, a sound somewhat similar to the ‹ny› in English canyon. In Italian, the trigraph ‹gli›, when appearing before a vowel, represents the palatal lateral approximant /ʎ/; in the definite article and pronoun gli /ʎi/, the digraph ‹gl› represents the same sound. The letter G is also used as a slang for the word Gangster or Ganagsta, commonly used in phrases like My grand dad is a 'G'. In Maori (Te Reo Māori), ‹g› is used in the combination ‹ng› which represents the velar nasal /ŋ/ and is pronounced like the ‹ng› in singer.
Strictly speaking, of course, the letter ‹g› is not present in other scripts, but the sound it represents is present in many world languages, and is represented by many different graphemes.
The Cyrillic alphabet analogue is marked as ‹г› (e.g. in Russian, Bulgarian, Macedonian, Serbian, etc.) or ‹ґ› (in Ukrainian as additional letter with a slightly different pronunciation). The Hebrew analogue is gimel ‹ג›.
Classical Arabic did not have plain /ɡ/ in its native words (the palatalized form /ɡʲ/ or /ɟ/ is believed to have been used), but the sound is standard in Modern Standard Arabic in Egypt, so as [ɡ] is the standard sound in Egyptian Arabic, in which loanwords are normally transcribed with ‹ج› (Gīm). However, foreign words containing /ɡ/ may be transcribed using other letters, such as: گ (Gāf, not part of standard letters), ق (qāf), ك (kāf), غ (Ghain) in loanwords or in varieties of Arabic, but not in Egypt, because ‹ج› is normally pronounced [ɡ] in all cases.
The EBCDIC code for capital ‹G› is 199 and for lowercase ‹g› is 135.