In a certain way, it's certainly a duplicate question. But I did not find the original.
I have adapted an old code to obtain the following nice presentation of the matrix
mtc = {{0, 2784, 2788, 2720, 2766}, {3034, 0, 2780, 2748, 2637}, {3030,
3038, 0, 2932, 3028}, {3098, 3070, 2886, 0, 2795}, {3052, 3181,
2790, 3023, 0}}
Here is the code:
Grid[Join[{Join[{"(x,y)"}, l]}, Flatten /@ Transpose[{l, mtc}]],
Alignment -> Center,
Background -> {{1 -> LightGray}, {1 -> LightGray}, {1, 1} -> None},
Dividers -> {{2 -> True}, {2 -> True}},
ItemStyle -> Directive[FontSize -> 16], Frame -> True,
Spacings -> {1.5, 1.5}]
But now I would like that, if a number say $x[i, j]$ is greater than a number $x[j, i]$, the backgroud be lightreded, and, lightblued in the contrary.