The determinant ∣A∣=0(ae−bd)−1(e−d)+c(b−a)=d−e+c(b−a).
We need ∣A∣=1 or ∣A∣=−1 with a,b,c,d,e∈{0,1}.
Case 1: c=0.
∣A∣=d−e.
For ∣A∣=1, (d,e)=(1,0). a,b can be any of {0,1}, so 2imes2=4 ways.
For ∣A∣=−1, (d,e)=(0,1). a,b can be any of {0,1}, so 2imes2=4 ways.
Total for c=0 is 4+4=8.
Case 2: c=1.
∣A∣=d−e+b−a.
Let X=d+b and Y=e+a. Possible values for X,Y are {0,1,2}.
∣A∣=X−Y.
For ∣A∣=1, (X,Y)∈{(1,0),(2,1)}.
- X=1,Y=0⟹(d,b)∈{(1,0),(0,1)} and (e,a)=(0,0). Total 2×1=2 ways.
- X=2,Y=1⟹(d,b)=(1,1) and (e,a)∈{(1,0),(0,1)}. Total 1×2=2 ways.
Subtotal for ∣A∣=1 is 4.
For ∣A∣=−1, (X,Y)∈{(0,1),(1,2)}.
- X=0,Y=1⟹(d,b)=(0,0) and (e,a)∈{(1,0),(0,1)}. Total 1×2=2 ways.
- X=1,Y=2⟹(d,b)∈{(1,0),(0,1)} and (e,a)=(1,1). Total 2×1=2 ways.
Subtotal for ∣A∣=−1 is 4.
Total for c=1 is 4+4=8.
Overall total elements in S=8+8=16.