the number of possible matrices of order 2*3 with each entry 0, 1 or 2

you need to fill 6 places with either 0, 1, or 2

= 3*3*3*3*3*3
= 3^6
= 729