  Mars lacks a substantial magnetic field; as a result, the solar wind ablates
the Martian atmosphere, making the surface uninhabitable. Therefore, any
terraforming attempt will require an artificial Martian magnetic shield. The
fundamental challenge of building an artificial magnetosphere is to condense
planetary-scale currents and magnetic fields down to the smallest mass
possible. Superconducting electromagnets offer a way to do this. However, the
underlying physics of superconductors and electromagnets limits this
concentration. Based upon these fundamental limitations, we show that the
amount of superconducting material is proportional to $B_c^{-2}a^{-3}$, where
$B_c$ is the critical magnetic field for the superconductor and $a$ is the loop
radius of a solenoid. Since $B_c$ is set by fundamental physics, the only truly
adjustable parameter for the design is the loop radius; a larger loop radius
minimizes the amount of superconducting material required. This non-intuitive
result means that the "intuitive" strategy of building a compact electromagnet
and placing it between Mars and the Sun at the first Lagrange point is
unfeasible. Considering reasonable limits on $B_c$, the smallest possible loop
radius is $\sim$10 km, and the magnetic shield would have a mass of $\sim
10^{19}$ g. Most high-temperature superconductors are constructed of rare
elements; given solar system abundances, building a superconductor with $\sim
10^{19}$ g would require mining a solar system body with several times
$10^{25}$ g; this is approximately 10% of Mars. We find that the most feasible
design is to encircle Mars with a superconducting wire with a loop radius of
$\sim$ 3400 km. The resulting wire diameter can be as small as $\sim$5 cm. With
this design, the magnetic shield would have a mass of $\sim 10^{12}$ g and
would require mining $\sim 10^{18}$ g, or only 0.1\% of Olympus Mons.
