Memory matrix sketch