A least-squares finite element approximation scheme for electromagneti
c fields in two-dimensional domains is discussed. Considering the magn
etic-field strength H and the vector of the current density J as unkno
wns, we describe Maxwell's equation as a time-dependent form in three
dimensions, then reduce it into two-dimensional steady problems of two
categories. Based on the first-order system of partial differential e
quations, the least-squares method is applied to the finite-element me
thod. The rates of convergence for both H and J achieve optimal order.
This method creates an easy way to develop computer software.