A magnetic-resonance imaging system including a magnetic-resonance sensor including
at least one magneto-resistive element; and a sample disposed adjacent to the magnetic-resonance
sensor and configurable to generate a magnetic-resonance signal, wherein the magneto-resistive
element is configured to generate a magnetic field in response to a current driven
through the magneto-resistive element, the magnetic field being configured to polarize
spins of the sample, and detect a magnetic-resonance signal from precession of
the spins.