merge matrix and interface