I think you need to initialize all elements of matrix with some values