local continuity equation and the retarded time are the cornerstones on which Maxwell’s equations are based and therefore they can be considered to be the two fundamental postulates for these equations. It is worth mentioning that although Maxwell’s equations are universally accepted, the question of what their fundamental physical postulates are remains a topic of discussion and debate [@13; @14; @15; @16; @17; @18; @19].

The derivation of Maxwell’s equations presented here in its three-dimensional and four-dimensional versions, which considers potentials as primary quantities and fields as derived quantities, may be useful to grasp the background of Maxwell’s theory and may be presented in undergraduate courses of electromagnetism.

 {#section-1 .unnumbered}

The electric charge conservation can locally be expressed by the continuity equation $$\nabla\cdot\!\textbf{ J}+\frac{\partial\rho}{\partial t}=0,$$ where $\rho$ and $\textbf{J} $ are the *localised* charge and current densities which are functions of space and time. Our approach to obtain Maxwell’s equations involves two ingredients: The basic axiom expressed by the continuity equation and a heuristic handle of this equation which involves the concept of causality.

We then assume the existence of certain functions of space and time which are *causally* produced by these localised charge and current densities. Let us call 