Setup matrices.