In the Bloch equations, within a voxel each spin along the dimension
can be described by a magnetization vector
where every element is real valued.[6] But
and
can also be described by the complex number
.[7] Using a similarity matrix
we can convert between the real valued basis and the complex transverse magnetization basis:

where
is the complex conjugate of
. To perform a rotation on the complex magnetization vector
due to an RF pulse with angle
and phase
, we first apply a change of basis with
, then apply standard cartesian rotation matrices
,
,[8] then another change of basis with
:[9]

Where
denotes the magnetization vector after the rotation. In the EPG representation we perform a Fourier decomposition of each element of the complex magnetization vector:[2]

If
,
, and
when
or
. We can write the summations as being from
to
. We can also write the Fourier coefficients as a vector valued function:

When performing a rotation, because
is constant across
it can enter the sum:

It can be seen in the equation above that the rotation matrix can be applied directly to the Fourier coefficients to produce updated Fourier coefficients.[1]
A gradient in the z dimension that creates one twist from
to
can be applied with the matrix:

This matrix is independent of
so it can enter the Fourier sum:[10]

Looking at each element of
:

Performing a substitution with
for the first element we get:

If
and
the above summation is equal to:[11]

and it can be seen that
. By the same logic
. So gradients in the EPG formalism simply shift the indices of the Fourier coefficients.[12][1]
The relaxation and recovery matrices given by the Bloch equations for a real valued magnetization vector
are:[7]

Substituting with
:

and
are commutative so
. Also
, so:

is a constant vector but we can still Fourier decompose it to
where
if
else
, so:[13]

So it can be seen that to apply a relaxation, you can multiply every Fourier coefficient with the relaxation matrix
and then add the recovery vector
to the 0th coefficient.[14]
The total transverse signal in the voxel is obtained by integrating over
:

so when
is nonzero,
is multiplied by zero and doesn't end up in the sum. If
the inner integral is 1. So the total transverse signal in the voxel is just
. By the same logic the total longitudinal signal is
.[11]
It can be proven that
:[13][15]

and so in practice only coefficients with
are stored and if a gradient occurs that would shift a coefficient to having a negative index, instead that coefficient is conjugated and stored at a non-negative index.