  The Mg I 12.32 and 12.22 $\mu$m lines are a pair of emission lines that
present a great advantage for accurate solar magnetic field measurement. They
potentially contribute to the diagnosis of solar atmospheric parameters through
their high magnetic sensitivity. The goal of this study is to understand the
radiation transfer process of these lines in detail and explore the ability of
magnetic field diagnosis in the infrared. We calculated the Stokes profiles and
response functions of the two Mg I 12 $\mu$m lines based on one-dimensional
solar atmospheric models using the Rybicki-Hummer (RH) radiative transfer code.
The integration of these profiles with respect to the wavelength was used to
generate calibration curves related to the longitudinal and transverse fields.
The traditional single-wavelength calibration curve based on the weak-field
approximation was also tested to determine if it is suitable for the infrared.
The 12.32 $\mu$m line is more suitable for a magnetic field diagnosis because
its relative emission intensity and polarization signal are stronger than that
of the 12.22 $\mu$m line. The result from the response functions illustrates
that the derived magnetic field and velocity with 12.32 $\mu$m line mainly
originate from the height of 450 km, while that for the temperature is about
490 km. The calibration curves obtained by the wavelength-integrated method
show a nonlinear distribution. For the Mg I 12.32 $\mu$m line, the longitudinal
(transverse) field can be effectively inferred from Stokes V/I (Q/I and U/I) in
the linear range below $\sim 600$ G ($\sim 3000$ G) in quiet regions and below
$\sim 400$ G ($\sim 1200$ G) in penumbrae. Within the given linear range, the
method is a supplement to the magnetic field calibration when the Zeeman
components are incompletely split.
