Create the matrix first