# Bloch equations

In physics and chemistry, specifically in nuclear magnetic resonance (NMR), magnetic resonance imaging (MRI), and electron spin resonance (ESR), the Bloch equations are a set of macroscopic equations that are used to calculate the nuclear magnetization M = (M$_x$, M$_y$, M$_z$) as a function of time when relaxation times T$_1$ and T$_2$ are present. These are phenomenological equations that were introduced by Felix Bloch in 1946. Sometimes they are called the equations of motion of nuclear magnetization. They are analogous to the Maxwell–Bloch equations.

## In the laboratory (stationary) frame of reference

Let M(t) = (M$_x$(t), M$_y$(t), M$_z$(t)) be the nuclear magnetization. Then the Bloch equations read:
    ${\frac {dM_{x}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{x}-{\frac {M_{x}(t)}{T_{2}}}$
    ${\frac {dM_{y}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{y}-{\frac {M_{y}(t)}{T_{2}}}$
    ${\frac {dM_{z}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{z}-{\frac {M_{z}(t)-M_{0}}{T_{1}}}$
where γ is the gyromagnetic ratio and B(t) = (B$_x$(t), B$_y$(t), B$_0$ + ΔB$_z$(t)) is the magnetic field experienced by the nuclei. The z component of the magnetic field B is sometimes composed of two terms:
* one, B$_0$, is constant in time,
* the other one, ΔB$_z$(t), may be time dependent. It is present in magnetic resonance imaging and helps with the spatial decoding of the NMR signal.
M(t) × B(t) is the cross product of these two vectors. M$_0$ is the steady state nuclear magnetization (that is, for example, when t → ∞); it is in the z direction.

### Physical background

With no relaxation (that is both T$_1$ and T$_2$ → ∞) the above equations simplify to:
    ${\frac {dM_{x}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{x}$
    ${\frac {dM_{y}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{y}$
    ${\frac {dM_{z}(t)}{dt}}=\gamma (\mathbf {M} (t)\times \mathbf {B} (t))_{z}$
or, in vector notation:
    ${\frac {d\mathbf {M} (t)}{dt}}=\gamma \mathbf {M} (t)\times \mathbf {B} (t)$
This is the equation for Larmor precession of the nuclear magnetization M in an external magnetic field B.
The relaxation terms,
    $\left(-{\frac {M_{x}}{T_{2}}},-{\frac {M_{y}}{T_{2}}},-{\frac {M_{z}-M_{0}}{T_{1}}}\right)$
represent an established physical process of transverse and longitudinal relaxation of nuclear magnetization M.

### As macroscopic equations

These equations are not microscopic: they do not describe the equation of motion of individual nuclear magnetic moments. Those are governed and described by laws of quantum mechanics.
Bloch equations are macroscopic: they describe the equations of motion of macroscopic nuclear magnetization that can be obtained by summing up all nuclear magnetic moment in the sample.

### Alternative forms

Opening the vector product brackets in the Bloch equations leads to:
    ${\frac {dM_{x}(t)}{dt}}=\gamma \left(M_{y}(t)B_{z}(t)-M_{z}(t)B_{y}(t)\right)-{\frac {M_{x}(t)}{T_{2}}}$
    ${\frac {dM_{y}(t)}{dt}}=\gamma \left(M_{z}(t)B_{x}(t)-M_{x}(t)B_{z}(t)\right)-{\frac {M_{y}(t)}{T_{2}}}$
    ${\frac {dM_{z}(t)}{dt}}=\gamma \left(M_{x}(t)B_{y}(t)-M_{y}(t)B_{x}(t)\right)-{\frac {M_{z}(t)-M_{0}}{T_{1}}}$
The above form is further simplified assuming
    $M_{xy}=M_{x}+iM_{y}{\text{ and }}B_{xy}=B_{x}+iB_{y}\,$
where i = √−1. After some algebra one obtains:
    ${\frac {dM_{xy}(t)}{dt}}=-i\gamma \left(M_{xy}(t)B_{z}(t)-M_{z}(t)B_{xy}(t)\right)-{\frac {M_{xy}(t)}{T_{2}}}$.
    ${\frac {dM_{z}(t)}{dt}}=i{\frac {\gamma }{2}}\left(M_{xy}(t){\overline {B_{xy}(t)}}-{\overline {M_{xy}}}(t)B_{xy}(t)\right)-{\frac {M_{z}(t)-M_{0}}{T_{1}}}$
where
    ${\overline {M_{xy}}}=M_{x}-iM_{y}$.
is the complex conjugate of M$_{xy}$. The real and imaginary parts of M$_{xy}$ correspond to M$_x$ and M$_y$ respectively. M$_{xy}$ is sometimes called transverse nuclear magnetization.

### Matrix form

The Bloch equations can be recast in matrix-vector notation:
    ${\frac {d}{dt}}\left({\begin{array}{c}M_{x}\\M_{y}\\M_{z}\end{array}}\right)=\left({\begin{array}{ccc}-{\frac {1}{T_{2}}}&\gamma B_{z}&-\gamma B_{y}\\-\gamma B_{z}&-{\frac {1}{T_{2}}}&\gamma B_{x}\\\gamma B_{y}&-\gamma B_{x}&-{\frac {1}{T_{1}}}\end{array}}\right)\left({\begin{array}{c}M_{x}\\M_{y}\\M_{z}\end{array}}\right)+\left({\begin{array}{c}0\\0\\{\frac {M_{0}}{T_{1}}}\end{array}}\right)$

## In a rotating frame of reference

In a rotating frame of reference, it is easier to understand the behaviour of the nuclear magnetization M. This is the motivation:

### Solution of Bloch equations with T$_1$, T$_2$ → ∞

Assume that:
* at t = 0 the transverse nuclear magnetization M$_{xy}$(0) experiences a constant magnetic field B(t) = (0, 0, B$_0$);
* B$_0$ is positive;
* there are no longitudinal and transverse relaxations (that is T$_1$ and T$_2$ → ∞).
Then the Bloch equations are simplified to:
    ${\frac {dM_{xy}(t)}{dt}}=-i\gamma M_{xy}(t)B_{0}$,
    ${\frac {dM_{z}(t)}{dt}}=0$.
These are two (not coupled) linear differential equations. Their solution is:
    $M_{xy}(t)=M_{xy}(0)e^{-i\gamma B_{0}t}$,
    $M_{z}(t)=M_{0}={\text{const}}\,$.
Thus the transverse magnetization, M$_{xy}$, rotates around the z axis with angular frequency ω$_0$ = γB$_0$ in clockwise direction (this is due to the negative sign in the exponent). The longitudinal magnetization, M$_z$ remains constant in time. This is also how the transverse magnetization appears to an observer in the laboratory frame of reference (that is to a stationary observer).
M$_{xy}$(t) is translated in the following way into observable quantities of M$_x$(t) and M$_y$(t): Since
    $M_{xy}(t)=M_{xy}(0)e^{-i\gamma B_{z0}t}=M_{xy}(0)\left[\cos(\omega _{0}t)-i\sin(\omega _{0}t)\right]$
then
    $M_{x}(t)={\text{Re}}\left(M_{xy}(t)\right)=M_{xy}(0)\cos(\omega _{0}t)$,
    $M_{y}(t)={\text{Im}}\left(M_{xy}(t)\right)=-M_{xy}(0)\sin(\omega _{0}t)$,
where Re(z) and Im(z) are functions that return the real and imaginary part of complex number z. In this calculation it was assumed that M$_{xy}$(0) is a real number.

### Transformation to rotating frame of reference

This is the conclusion of the previous section: in a constant magnetic field B$_0$ along z axis the transverse magnetization M$_{xy}$ rotates around this axis in clockwise direction with angular frequency ω$_0$. If the observer were rotating around the same axis in clockwise direction with angular frequency Ω, M$_{xy}$ it would appear to her or him rotating with angular frequency ω$_0$ - Ω. Specifically, if the observer were rotating around the same axis in clockwise direction with angular frequency ω$_0$, the transverse magnetization M$_{xy}$ would appear to her or him stationary.
This can be expressed mathematically in the following way:
* Let (x, y, z) the Cartesian coordinate system of the laboratory (or stationary) frame of reference, and
* (x′, y′, z′) = (x′, y′, z) be a Cartesian coordinate system that is rotating around the z axis of the laboratory frame of reference with angular frequency Ω. This is called the rotating frame of reference. Physical variables in this frame of reference will be denoted by a prime.
Obviously:
    $M_{z}'(t)=M_{z}(t)\,$.
What is M$_{xy}$′(t)? Expressing the argument at the beginning of this section in a mathematical way:
    $M_{xy}'(t)=e^{+i\Omega t}M_{xy}(t)\,$.

### Equation of motion of transverse magnetization in rotating frame of reference

What is the equation of motion of M$_{xy}$′(t)?
    ${\frac {dM_{xy}'(t)}{dt}}={\frac {d\left(M_{xy}(t)e^{+i\Omega t}\right)}{dt}}=e^{+i\Omega t}{\frac {dM_{xy}(t)}{dt}}+i\Omega e^{+i\Omega t}M_{xy}(t)=e^{+i\Omega t}{\frac {dM_{xy}(t)}{dt}}+i\Omega M_{xy}'(t)$
Substitute from the Bloch equation in laboratory frame of reference:
    ${\begin{aligned}{\frac {dM_{xy}'(t)}{dt}}&=e^{+i\Omega t}\left[-i\gamma \left(M_{xy}(t)B_{z}(t)-M_{z}(t)B_{xy}(t)\right)-{\frac {M_{xy}(t)}{T_{2}}}\right]+i\Omega M_{xy}'(t)\\&=\left[-i\gamma \left(M_{xy}(t)e^{+i\Omega t}B_{z}(t)-M_{z}(t)B_{xy}(t)e^{+i\Omega t}\right)-{\frac {M_{xy}(t)e^{+i\Omega t}}{T_{2}}}\right]+i\Omega M_{xy}'(t)\\&=-i\gamma \left(M_{xy}'(t)B_{z}(t)-M_{z}(t)B_{xy}'(t)\right)+i\Omega M_{xy}'(t)-{\frac {M_{xy}'(t)}{T_{2}}}\\\end{aligned}}$
But by assumption in the previous section: B$_z$′(t) = B$_z$(t) = B$_0$ + ΔB$_z$(t) and M$_z$(t) = M$_z$′(t). Substituting into the equation above:
    ${\begin{aligned}{\frac {dM_{xy}'(t)}{dt}}&=-i\gamma \left(M_{xy}'(t)(B_{0}+\Delta B_{z}(t))-M_{z}'(t)B_{xy}'(t)\right)+i\Omega M_{xy}'(t)-{\frac {M_{xy}'(t)}{T_{2}}}\\&=-i\gamma B_{0}M_{xy}'(t)-i\gamma \Delta B_{z}(t)M_{xy}'(t)+i\gamma B_{xy}'(t)M_{z}'(t)+i\Omega M_{xy}'(t)-{\frac {M_{xy}'(t)}{T_{2}}}\\&=i(\Omega -\omega _{0})M_{xy}'(t)-i\gamma \Delta B_{z}(t)M_{xy}'(t)+i\gamma B_{xy}'(t)M_{z}'(t)-{\frac {M_{xy}'(t)}{T_{2}}}\\\end{aligned}}$
This is the meaning of terms on the right hand side of this equation:
* i (Ω - ω$_0$) M$_{xy}$′(t) is the Larmor term in the frame of reference rotating with angular frequency Ω. Note that it becomes zero when Ω = ω$_0$.
* The -i γ ΔB$_z$(t) M$_{xy}$′(t) term describes the effect of magnetic field inhomogeneity (as expressed by ΔB$_z$(t)) on the transverse nuclear magnetization; it is used to explain T$_2$$^*$. It is also the term that is behind MRI: it is generated by the gradient coil system.
* The i γ B$_{xy}$′(t) M$_z$(t) describes the effect of RF field (the B$_{xy}$′(t) factor) on nuclear magnetization. For an example see below.
* - M$_{xy}$′(t) / T$_2$ describes the loss of coherency of transverse magnetization.
Similarly, the equation of motion of M$_z$ in the rotating frame of reference is:
    ${\frac {dM_{z}'(t)}{dt}}=i{\frac {\gamma }{2}}\left(M'_{xy}(t){\overline {B'_{xy}(t)}}-{\overline {M'_{xy}}}(t)B'_{xy}(t)\right)-{\frac {M_{z}-M_{0}}{T_{1}}}$

### Time independent form of the equations in the rotating frame of reference

When the external field has the form:
    $B_{x}(t)=B_{1}\cos \omega t$
    $B_{y}(t)=-B_{1}\sin \omega t$
    $B_{z}(t)=B_{0}$,
We define:
    $\epsilon :=\gamma B_{1}$ and $\Delta :=\gamma B_{0}-\omega$ ,
and get (in the matrix-vector notation):
    ${\frac {d}{dt}}\left({\begin{array}{c}M'_{x}\\M'_{y}\\M'_{z}\end{array}}\right)=\left({\begin{array}{ccc}-{\frac {1}{T_{2}}}&\Delta &-\epsilon \\-\Delta &-{\frac {1}{T_{2}}}&\epsilon \\\epsilon &-\epsilon &-{\frac {1}{T_{1}}}\end{array}}\right)\left({\begin{array}{c}M'_{x}\\M'_{y}\\M'_{z}\end{array}}\right)+\left({\begin{array}{c}0\\0\\{\frac {M_{0}}{T_{1}}}\end{array}}\right)$

## Simple solutions
### Relaxation of transverse nuclear magnetization M$_{xy}$

Assume that:
* The nuclear magnetization is exposed to constant external magnetic field in the z direction B$_z$′(t) = B$_z$(t) = B$_0$. Thus ω$_0$ = γB$_0$ and ΔB$_z$(t) = 0.
* There is no RF, that is B$_{xy}$' = 0.
* The rotating frame of reference rotates with an angular frequency Ω = ω$_0$.
Then in the rotating frame of reference, the equation of motion for the transverse nuclear magnetization, M$_{xy}$'(t) simplifies to:
    ${\frac {dM_{xy}'(t)}{dt}}=-{\frac {M_{xy}'}{T_{2}}}$
This is a linear ordinary differential equation and its solution is
    $M_{xy}'(t)=M_{xy}'(0)e^{-t/T_{2}}$.
where M$_{xy}$'(0) is the transverse nuclear magnetization in the rotating frame at time t = 0. This is the initial condition for the differential equation.
Note that when the rotating frame of reference rotates exactly at the Larmor frequency (this is the physical meaning of the above assumption Ω = ω$_0$), the vector of transverse nuclear magnetization, M$_{xy}$(t) appears to be stationary.

### Relaxation of longitudinal nuclear magnetization M$_z$

Assume that:
* The nuclear magnetization is exposed to constant external magnetic field in the z direction B$_z$′(t) = B$_z$(t) = B$_0$. Thus ω$_0$ = γB$_0$ and ΔB$_z$(t) = 0.
* There is no RF, that is B$_{xy}$' = 0.
* The rotating frame of reference rotates with an angular frequency Ω = ω$_0$.
Then in the rotating frame of reference, the equation of motion for the longitudinal nuclear magnetization, M$_z$(t) simplifies to:
    ${\frac {dM_{z}(t)}{dt}}=-{\frac {M_{z}(t)-M_{z,\mathrm {eq} }}{T_{1}}}$
This is a linear ordinary differential equation and its solution is
    $M_{z}(t)=M_{z,\mathrm {eq} }-[M_{z,\mathrm {eq} }-M_{z}(0)]e^{-t/T_{1}}$
where M$_z$(0) is the longitudinal nuclear magnetization in the rotating frame at time t = 0. This is the initial condition for the differential equation.

### 90 and 180° RF pulses

Assume that:
* Nuclear magnetization is exposed to constant external magnetic field in z direction B$_z$′(t) = B$_z$(t) = B$_0$. Thus ω$_0$ = γB$_0$ and ΔB$_z$(t) = 0.
* At t = 0 an RF pulse of constant amplitude and frequency ω$_0$ is applied. That is B'$_{xy}$(t) = B'$_{xy}$ is constant. Duration of this pulse is τ.
* The rotating frame of reference rotates with an angular frequency Ω = ω$_0$.
* T$_1$ and T$_2$ → ∞. Practically this means that τ ≪ T$_1$ and T$_2$.
Then for 0 ≤ t ≤ τ:
    ${\begin{aligned}{\frac {dM_{xy}'(t)}{dt}}=i\gamma B_{xy}'M_{z}(t)\end{aligned}}$
    ${\frac {dM_{z}(t)}{dt}}=i{\frac {\gamma }{2}}\left(M'_{xy}(t){\overline {B'_{xy}}}-{\overline {M'_{xy}}}(t)B'_{xy}\right)$