Groupwise nonrigid registrations of medical images define dense correspondences across a set of images, defined by a continuous deformation field that relates each target image in the group to some reference image. These registrations can be automatic, or based on the interpolation of a set of user-defined landmarks, but in both cases, quantifying the normal and abnormal structural variation across the group of imaged structures implies analysis of the set of deformation fields. We contend that the choice of representation of the deformation fields is an integral part of this analysis. This paper presents methods for constructing a general class of multi-dimensional diffeomorphic representations of deformations. We demonstrate, for the particular case of the polyharmonic clamped-plate splines, that these representations are suitable for the description of deformations of medical images in both two and three dimensions, using a set of two-dimensional annotated MRI brain slices and a set of three-dimensional segmented hippocampi with optimized correspondences. The class of diffeomorphic representations also defines a non-Euclidean metric on the space of patterns, and, for the case of compactly supported deformations, on the corresponding diffeomorphism group. In an experimental study, we show that this non-Euclidean metric is superior to the usual ad hoc Euclidean metrics in that it enables more accurate classification of legal and illegal variations.