Personal pronouns in the dative

Any noun can be replaced by a pronoun. Personal pronouns refer to living beings, things or contexts.

Pronouns can be in the nominative, accusative, dative and genitive cases. In other words, they can be inflected.
The following chart shows the personal pronouns in the dative:

        Nominative
Singular 1st person:   ich
  2nd person:   du
  3rd person:   er/sie/es
Plural 1st person:   wir
  2nd person:   ihr
  3rd person:   sie
The polite form of address:   Sie
       
      Accusative
Singular 1st person:   mich
  2nd person:   dich
  3rd person:   ihn/sie/es
Plural 1st person:   uns
  2nd person:   euch
  3rd person:   sie
The polite form of address:   Sie
       
      Dative
Singular 1st person:   mir
  2nd person:   dir
  3rd person:   ihm/ihr/ihm
Plural 1st person:   uns
  2nd person:   euch
  3rd person:   ihnen
The polite form of address:   Ihnen

Personal pronouns in the dative answer the question "Wem?" (whom).

Examples:
Die Hose gefällt mir.
Wem gefällt die Hose? — Die Hose gefällt mir.

Ich danke Ihnen!
Wem danke ich? — Ich danke Ihnen.