create a matrix