The matrices in the form [a11a21a12a22],aij∈{0,1,2},a11=a12 are [00/1/20/1/20],[10/1/20/1/21],[20/1/20/1/22]
At any place, 0/1/2 means 0, 1 or 2 will be the element at that place.
Hence there are total 27=3×3+3×3+3×3 matrices of the above form. Out of which the matrices which are singular are [000/1/20],[01/200],[1111],[2222]
Hence there are total 7(= 3 + 2 + 1 + 1) singular matrices.
Therefore number of all non-singular matrices in the given form = 27 - 7 = 20