A novel method for deriving the diffraction transfer matrix and its application to multi-body interactions in water waves