input matrix