Magnetic resonance imaging uses real and complex forms of the Fourier transform and to a lesser degree the Radon transform and their appropriate inverses. Under ideal conditions, these solutions are fast and optimal in the sense of signal-to-noise ratio (S/N). In practice, though, the phase of the signal may not be ideal so that the effective forward transform is no longer a Fourier transform. Using the inverse Fourier transform would then result in an image with artifacts. In this paper the generalised matrix inverse problem is addressed for such non-ideal conditions. Solutions are obtained for the following non-ideal circumstances: non-uniform sampling; imaging in the presence of motion; deconvolution of T2 effects; resolution enhancement; one-sided data reconstruction. The method is applicable to other deviant models as well. The goal is to maintain some specified property of the image, such as resolution, with minimal production of artifacts. A concomitant loss in S/N is inevitable for such trade-offs, but is often not a serious problem compared with the artifacts themselves.