A generalized theory of twinning in lattices is developed based on the definition that a twinning shear is any shear which restores a lattice in a new orientation. Shears of this kind describe the macroscopic shape deformation associated with deformation twinning which is an important contributory factor in the plastic deformation of many crystalline materials. It is shown that all shears of this kind may be derived from unimodular correspondence matrices satisfying certain simple restrictions. The form of these correspondence matrices is discussed for primitive and centred lattices when all or only a fraction of the lattice points are sheared to correct twin positions. Relations between shear modes associated with closely related matrices are also examined. A convenient method of choosing unimodular matrices which predict twinning modes with small shear strains is then described and a table of such matrices presented. It is then shown that the correspondence matrices describing conventional twinning modes, arising from the classical theories of deformation twinning, are identical to their own inverses. However, many other matrices, not having this property but satisfying the conditions of the general theory, exist and must therefore describe non-conventional twinning modes. Certain general characteristics of these modes including various degeneracies are analysed. In particular it is shown that they do not obey the standard orientation relations of classical twinning modes. In addition they are described in general by four irrational twinning elements, whereas classical modes have at least two of the four elements rational. Applications of the theory to specific lattices and examples of these new modes will be presented in a subsequent paper.