In Ancient Greek, all nouns are classified according to grammatical gender (masculine, feminine, neuter) and are used in a number (singular, dual, or plural). According to their function in a sentence, their form changes to one of the five cases (nominative, vocative, accusative, genitive, or dative). The set of forms that a noun will take for each case and number is determined by the declension that it follows.

Cases
The five cases of Ancient Greek each have different functions.

Nominative
The Ancient Greek nominative, like the Proto-Indo-European nominative, is used for the subject and for things describing the subject (predicate nouns or adjectives): 
 
 
 "For Socrates was wise and just."

Vocative
The vocative is used for addressing people or things. It is frequently the same as the nominative in the singular and always the same in the plural.
 
 
 "What you say is true, Socrates."

Accusative
The accusative is used for the object of a verb, and also after prepositions. After prepositions it is often used for the destination of motion:
 
 
 "They send messengers to Crete."

Genitive
The Ancient Greek genitive can often be translated with the preposition "of" or the English possessive case:

"The wife of Caesar."

It is also used after prepositions, especially those which mean "from":  

"He went away from the market-place."

Dative
The Ancient Greek dative corresponds to the Proto-Indo-European dative, instrumental, or locative. When it corresponds to the dative, it expresses the person or thing that is indirectly affected by an action, and can often be translated with the prepositions "to" or "for":
 
 
 "He tells the oracle to Socrates."

When the dative corresponds to the Proto-Indo-European instrumental, it expresses the thing with which something is done, and can often be translated by the preposition "with":
 
 
 "He was hitting me with stones."

When the dative corresponds to the Proto-Indo-European locative case (this is often the case when it is used with prepositions), it expresses location (sometimes figuratively) or time, and can often be translated by "in", "at", or "on":
 
 
 "In the third year they came to an agreement with the Athenians."

The dative is also frequently used after prepositions, such as  () "in":
 
 
 "He died in the battle."

Declension

Accent of strong and weak cases
For first- and second-declension nouns accented on the ultima and third-declension nouns with a single-syllable stem, the strong cases (nominative and accusative) have one type of accent, and the weak cases (genitive and dative) have another.

Specifically, the first- and second-declension nouns have acute (´) in the strong cases, but circumflex (ˆ) in the weak cases. Third-declension nouns have the accent on the stem in the strong cases, but the ending in the weak cases.

Both of these patterns can be summarized by a single rule suggested by Paul Kiparsky: pre-ending accent in the strong cases and post-stem accent in the weak cases.

For first- and second-declension nouns, Kiparsky's rule is more complex. The thematic vowel ( or ) counts as neither stem nor ending, but alternates between the two depending on which accent is considered. For post-stem accent, it counts as part of the ending; for pre-ending accent, it counts as part of the stem.

Greek definite article

First declension

The first declension or alpha declension is considered thematic, with long alpha () at the end of the stem, though it is derived from original athematic Indo-European forms. In Attic Greek, this changes to  everywhere except after  or . The first declension includes mostly feminine nouns, but also a few masculine nouns, including agent nouns in , patronyms in , and demonyms.

The first-declension genitive plural always takes a circumflex on the last syllable. In Homeric Greek the ending was  () or  (through shortening from *).  was contracted to  in Attic.

Feminine long a-stem

Feminine short a-stem
Some nouns have short  in the nominative, vocative and accusative singular, but are otherwise identical to other feminine first-declension nouns. They are recessively accented.

Most nouns in this category were formed with the suffix  (sometimes written ). The  (representing the semivowel ) undergoes one of several sound changes with the consonant at the end of the stem:
  > , Attic  "tongue" (palatalization; compare  "point")
  >  "portion" (metathesis; compare )
  >  "bridge" (compensatory lengthening of  after loss of )
 PIE  > Proto-Greek  >  > Attic Greek  "truth" (assimilation of  to ; compare  "something true")

Masculine a-stem
Masculine first-declension nouns end in  or  in Attic. Homer retains the older masculine ending  and uses  "sailor" instead of : compare Latin nauta.

The masculine genitive singular ending comes from the second declension. Homeric Greek uses  or .

Second declension

The second or omicron declension is thematic, with an  or  at the end of the stem. It includes one class of masculine and feminine nouns and one class of neuter nouns.

When a second-declension noun is accented on the ultima, the accent switches between acute for the nominative, accusative, and vocative, and circumflex for the genitive and dative. The only exceptions are Attic-declension and contracted nouns.

Masculine and feminine o-stems
Masculine and feminine both end in , and can only be distinguished by an article or adjective.

Neuter o-stems
In the neuter, the nominative, vocative and accusative are the same, with a singular in  and plural in . Other forms are identical to the masculine and feminine second declension.

Attic declension
In the Attic dialect, some masculine second-declension nouns and some adjectives have endings with lengthened vowels. Some nouns in this category end in , which developed from an original * by the process of quantitative metathesis (switching of vowel lengths). All second-declension endings containing  were transformed:
  → 
  → 

The placement of the accent does not change, even when the ultima is long, and all forms take an acute instead of a circumflex.

In these nouns, the nominative singular, vocative singular, and accusative plural are identical, as are the accusative singular and genitive plural, and the dative singular and nominative and vocative plural.

Contracted second declension
In Attic, nouns and adjectives ending in  or  and  or  are contracted so that they end in  and .

When the ultima is accented, it takes a circumflex in all forms, including the nominative, accusative, and vocative.

Third declension
The third declension group includes masculine, feminine and neuter nouns. It is an athematic declension that lacks the standard thematic vowels of the two thematic declensions above. This results in varied and often complex phonemic interactions between stem and ending, especially so between adjacent consonants, that often make these nouns appear to be highly irregular compared to their straightforward thematic counterparts.

These nouns in the nominative singular end with the vowels  or with the consonants  (). They form the genitive case with  or .

Third-declension nouns have one, two, or three stems, unlike first- and second-declension nouns, which always have only one stem. Each stem is used in different case-and-number forms. In nouns with two stems, the stem with the long vowel is called the strong stem, while the stem with the short vowel is called the weak stem. The strong stem is found at the nominative singular, and the weak stem in the genitive singular.
 (long vowel, strong stem: nominative singular)
 (short vowel, weak stem: genitive singular)

Endings
The masculine and feminine nominative singular ordinarily ends in , but has no ending in some nouns whose stems end in  and , and all nouns in  (from *),  (from *),  (from *), . The neuter nominative, accusative, and vocative singular always has no ending.

The  of the accusative singular and plural was originally a syllabic ν. The accusative singular ending  appears after Proto-Greek consonants, and is much more common than , because almost all third-declension stems end in a consonant. When a Proto-Greek consonant was lost (ϝ, , ),  appears after a vowel, and may be lengthened to : . The ending  appears after the vowels  and : . The ending  always changes to , except in the accusative plural of , where it lengthens the preceding  by compensatory lengthening, yielding .

A peculiar subset of this declension is used when declining foreign masculine names such as : the nominative takes a sigma, the genitive and vocative are the bare stem, the dative may receive an iota subscript if possible, the accusative receives a nu. However, other nouns in which the cluster arising with the sigma at nominative would be un-Greek (e.g. ) are instead kept undeclined.

Consonant-stems
These nouns end in  (). Based on the last letter of the stem, they are divided into two categories:

The mute-stem nouns have stems ending in  (velar-stem nouns),  (labial-stem nouns),  (dental-stem nouns).

The semi mute-stem nouns have stems ending in  (nasal-stem nouns),  (liquid-stem nouns),  (sibilant-stem nouns).

Nominative singular  and dative plural  cause pronunciation or spelling changes, depending on the consonant at the end of the stem.

Velar- and labial-stems
In the nominative singular and dative plural, the velars  combined with  are written as , and the labials  combined with  are written as .

Dental- and nasal-stems

Stems in t
In the nominative singular and dative plural, a dental  before  is lost: , not .

If a noun is not accented on the last syllable and ends in , or , it often has an accusative singular in  and a vocative with no ending.
 
  (accusative)
  (vocative)

Single-stems in nt
In the nominative singular and dative plural,  before  is lost, and the previous vowel is lengthened by compensatory lengthening. In the vocative singular, final  is lost, as Ancient Greek words cannot end in stops.

When a noun is accented on the last syllable, the vocative singular is identical to the nominative:

 (vocative)

Double-stems in nt
These nouns have a weak stem in  and a strong stem in . The strong stem is used only in the nominative singular. The vocative singular is the weak stem without an ending. In both the nominative and vocative singular, the final  disappears. In the dative plural, the  in the ending causes the  to disappear, and the  is lengthened to  by compensatory lengthening.

Stems in at
In these nouns, the stem originally ended in  (with syllabic n), which changed to  in Greek. In the nominative singular, the final  disappeared.

Single-stems in an, en, in, on
Some nouns have stems ending in . The nominative singular may end in , causing compensatory lengthening, or have no ending.

Double-stems in en, on
Some nouns have a strong stem in  and a weak stem in . The nominative singular is the only form with the strong stem. Nouns of this class that are not accented on the last syllable use the weak stem without an ending for the vocative singular.
 
 (vocative)

Liquid-stems
Liquid-stems have stems ending in  or . Unlike mute-stems, these nouns do not change in spelling or pronunciation when the dative plural ending  is added.

Single-stems in er, or
Some nouns end in  and take the endings without any sound changes.

Double-stems in er, or
Some nouns have a nominative singular in . The stem for the rest of the forms ends in .
Nouns in this class that are not accented on the last syllable use the weak stem without an ending for the vocative singular.

Triple-stems in er
Some nouns have a strong stem in  in the nominative singular, a middle stem in  in other forms, and a weak stem in  in yet other forms. The  in the dative plural was added for ease of pronunciation; the original form ended in .

These include  "father",  "mother",  "daughter",  "stomach",  "Demeter",  "man".

The first three and  use the weak stem in the genitive and dative singular and in the dative plural. The rest use the weak stem in the genitive, dative, and accusative singular and in the plural.

The vocative singular is usually the middle stem without an ending and accent on the first syllable.

S-stems
Nouns in all three genders have stems ending in  or . But in most cases, the  was lost after being debuccalized to , so for the most part the stems appear to actually end in . In Attic, but not Ionic, the  or  is contracted with the vowel of the ending. When  combines with the  of the dative plural, the double  is simplified to single .

Masculines in es
There are several masculine proper names with nominative singulars in  and stems in . The vocative singular is the bare stem without an ending.

Feminines in os
There are a two feminines with nominative singulars in  and stems in .

Neuters in es
Some neuter nouns have nominative, accusative, and vocative singulars in , and stems in .

Vowel-stems
These nouns end with .

Stems in long o
These take the endings without sound changes.

Single-stems in u
Because these nouns have a stem ending in , the accusative singular appears as  rather than , and the accusative plural changes by compensatory lengthening from  to .

Triple-stems in i or u
There are many feminine nouns in , and a few masculine nouns in , and one neuter noun:  "town".

One stem is in  or , another is in  or , and a third is in  or . But these stems underwent sound changes, so that they are no longer obvious. Before a vowel, the  or  in the second and third stem became the semivowel  or ϝ, and was lost. The long-vowel stem in the genitive singular was shortened, and the vowel in the ending lengthened (quantitative metathesis). Therefore, there appear to be two stems, ending in / and .

Stems in eu, au, ou
The nouns in  have two stems: one with short , another with long . Both originally ended with digamma, which by the time of Classical Greek had either vanished or changed to . Thus the stems end in , from *, and , from *. In Attic Greek the  of the stem underwent quantitative metathesis with the vowel of the ending—the switching of their lengths. This is the origin of the , and  of the forms based on the stem in .

The nouns with a vowel before the  often contract the final  of the stem (either original or from quantitative metathesis of ), which disappears into the following  and  of the genitive and accusative singular and plural. As is the rule, the vowel resulting from contraction takes a circumflex:
 :  (halieús), :  (haliéōs) and  (haliôs),  (haliéōn) and  (haliôn), :  (haliéa) and  (haliâ),  (haliéas) and  (haliâs).

Stems in oi
Stems in  end in  in the nominative singular. The  becomes the semivowel  and is lost, except in the vocative singular. There are no plural forms; when the plural does appear, it follows the second declension. The rest of the cases are formed by contraction.

Derivation

Diminutive suffixes
New nouns may be formed by suffix addition. Sometimes suffixes are added on top of each other:
  bíblos "papyrus"
  biblíon "book"
 , , ,  "small scroll"
biblárion, bibliárion, biblarídion, biblidárion
  biblídion "petition"

References

Further reading
 

Greek grammar
Ancient Greek