new matrix constructor