The set S consists of all 2×2 matrices (a11a21a12a22) where each entry aij is in {0,1,2} and a11=a22. Let a=a11=a22, b=a12, and c=a21. Then any matrix in S has the form (acba), with a,b,c∈{0,1,2}.
A matrix is non-singular if its determinant is non-zero. The determinant of (acba) is a⋅a−b⋅c=a2−bc. So, we require a2−bc=0.
Since a, b, and c each have 3 possible values (0, 1, or 2), the total number of matrices in S is 3×3×3=27. We need to subtract the number of singular matrices (where a2−bc=0) from 27 to find the non-singular ones.
We consider each possible value of a separately:
Case 1: a=0
Determinant is 02−bc=−bc. This is zero when bc=0.
Total matrices: a=0, b∈{0,1,2}, c∈{0,1,2} → 9 matrices.
Singular when bc=0:
- If b=0, any c (3 cases: c=0,1,2)
- If c=0, any b (but b=0 already counted) → add b=1,c=0 and b=2,c=0 → 2 more
Total singular: 3+2=5.
Non-singular: 9−5=4.
Alternatively, non-singular when b=0 and c=0, so b∈{1,2}, c∈{1,2} → 2×2=4.
Case 2: a=1
Determinant is 12−bc=1−bc. This is zero when bc=1.
Total matrices: 9.
Singular when bc=1:
- Only (b,c)=(1,1) works (since 1⋅1=1)
- Other pairs: (0,0)=0, (0,1)=0, (0,2)=0, (1,0)=0, (1,2)=2, (2,0)=0, (2,1)=2, (2,2)=4 → none equal 1
So only 1 singular matrix.
Non-singular: 9−1=8.
Case 3: a=2
Determinant is 22−bc=4−bc. This is zero when bc=4.
Total matrices: 9.
Singular when bc=4:
- Only (b,c)=(2,2) works (since 2⋅2=4)
- Other pairs give less than 4
So only 1 singular matrix.
Non-singular: 9−1=8.
Summing non-singular matrices: 4 (for a=0) + 8 (for a=1) + 8 (for a=2) = 20.
Hence, the correct answer is Option D.