Recurrence matrices