>> without changing their position horizontally
I infer that you can change their position vertically. If this is the case, then each column has 4! permutations, and their are 5 columns. So you have 4! x 4! x 4! x 4! x 4! = (4!)^5 = 24^5 = 7962624 possible matrices.