It is shown that Gauss' law of electrostatics and Ampere's law of magn
etostatics in two dimensions can be expressed in the form of Cauchy's
residue theorem, the positions and magnitudes of the sources playing t
he roles of poles and residues, respectively. These connections are us
ed to illustrate how to take advantagae of the knowledge of physics in
the study of mathematics, and viceversa, recognizing the convenience
of using the basis of one discipline to advance in the other one. A hi
storical note on the contributions of Gauss and Cauchy to the study of
analytical functions is also included.