The response matrix formulation of the multidimensional AN method for source and eigenvalue problems