In Magnetic Particle Imaging (MPI) the reconstruction requires the knowledge of a so called system function. This function describes the relation between spatial position and frequency response. For reasonable resolutions and field of views the system function becomes quite large, resulting in large acquisition times for the system function and high memory demand during reconstruction. The present invention proposes to reduce the size of the system function matrix by making use of structural properties of the matrix. Such properties are, for instance, spatial symmetries reducing the number of columns and identical responses at different frequencies reducing the number of rows. In other embodiments the matrix can be transformed to a sparse representation using appropriate base functions.