remove matrix