  The structure of classical electrodynamics based on the variational principle
together with causality and space-time homogeneity is analyzed. It is proved
that in this case the 4-potentials are defined uniquely. On the other hand, the
approach where Maxwell equations and the Lorentz law of force are regarded as
cornerstones of the theory allows gauge transformations. For this reason, the
two theories are not equivalent. A simple example substantiates this
conclusion. Quantum physics is linked to the variational principle and it is
proved that the same result holds for it. The compatibility of this conclusion
with gauge invariance of the Lagrangian density is explained. Several
alternative possibilities that may follow this work are pointed out.
