  We introduce a constructive algorithm for universal linear electromagnetic
transformations between the $N$ input and $N$ output modes of a dielectric
slab. The approach uses out-of-plane phase modulation programmed down to $N^2$
degrees of freedom. The total area of these modulators equals that of the
entire slab: our scheme satisfies the minimum area constraint for programmable
linear optical transformations. We also present error correction schemes that
enable high-fidelity unitary transformations at large $N$. This ``programmable
multimode interferometer'' (ProMMI) thus translates the algorithmic simplicity
of Mach-Zehnder meshes into a holographically programmed slab, yielding
DoF-limited compactness and error tolerance while eliminating the dominant
sidewall-related optical losses and directional-coupler-related patterning
challenges.
