  Magnetic fields are important for stellar photospheres and magnetospheres,
influencing photospheric physics and sculpting stellar winds. Observations of
stellar magnetic fields are typically made in the visible, although infrared
observations are becoming common. Here we consider the possibility of directly
detecting magnetic fields at ultraviolet (UV) wavelengths using high resolution
spectropolarimetry, specifically considering the capabilities of the proposed
Polstar mission. UV observations are particularly advantageous for studying
wind resonance lines not available in the visible, but they can also provide
many photospheric lines in hot stars. Detecting photospheric magnetic fields
using the Zeeman effect and Least Squares Deconvolution is potentially more
effective in the UV due to the much higher density of strong lines. We
investigate detecting magnetic fields in the magnetosphere of a star using the
Zeeman effect in wind lines, and find that this could be detectable at high S/N
in an O or B star with a strong magnetic field. We consider detecting magnetic
fields using the Hanle effect in linear polarization, which is complementary to
the Zeeman effect, and could be more sensitive in photospheric lines of rapid
rotators. The Hanle effect can also be used to infer circumstellar magnetism in
winds. Detecting the Hanle effect requires UV observations, and a multi-line
approach is key for inferring magnetic field properties. This demonstrates that
high resolution spectropolarimetry in the UV, and the proposed Polstar mission,
has the potential to greatly expand our ability to detect and characterize
magnetic fields in and around hot stars.
