  The MacWilliams identity, which relates the weight distribution of a code to
the weight distribution of its dual code, is useful in determining the weight
distribution of codes. In this paper, we derive the MacWilliams identity for
linear codes with the rank metric, and our identity has a different form than
that by Delsarte. Using our MacWilliams identity, we also derive related
identities for rank metric codes. These identities parallel the binomial and
power moment identities derived for codes with the Hamming metric.
