Analyzing the Setup
Our journey begins by defining our playground. We have a set Tp of 2×2 matrices of the form A=[acba], where every element is chosen from the set {0,1,2,…,p−1}.
Since we have three independent variables—a, b, and c—and each has p possible choices, the total number of matrices in our universe is:
This is our total sample space. The determinant of this matrix is given by:
This simple expression is the key that unlocks every door in this problem.
The Symmetric and Skew-Symmetric Challenge
A matrix is symmetric if b=c. The determinant becomes det(A)=a2−b2, which factors as (a−b)(a+b). For this to be divisible by p, we require:
Because p is a prime number, this forces either a≡b(modp) or a≡−b(modp). If a=b, we have p choices. If a=−b, we have p−1 choices (excluding the case a=b=0 to avoid double counting), yielding 2p−1 total symmetric matrices.
A matrix is skew-symmetric if AT=−A. This forces the diagonal elements to be zero (a=0) and the off-diagonal elements to be negatives (b=−c). The determinant becomes b2, which is divisible by p only if b=0.
This leads us back to the zero matrix, which we have already counted in the symmetric case. Thus, the total count for matrices that are symmetric, skew-symmetric, or both, such that the determinant is divisible by p, remains 2p−1.
The Trace and Determinant Dance
We now consider the condition where the trace is not divisible by p and the determinant is divisible by p. The trace is 2a. Since p is an odd prime, $2a
ot\equiv 0 \pmod{p}$ implies $a
eq 0$.
This gives us p−1 choices for a. For the determinant, we require bc≡a2(modp). Since $a
eq 0$, a2 is non-zero, which forces both b and c to be non-zero.
For any fixed a and any non-zero b, there is a unique c such that c≡a2b−1(modp). Since there are p−1 choices for b, there are p−1 choices for c. Multiplying these, we get:
The Grand Finale
Finally, we find the number of matrices where the determinant is NOT divisible by p. We use complementary counting by subtracting the number of matrices where det(A)≡0(modp) from the total p3.
We split the zero-determinant case based on a:
1. If a=0, then det(A)=−bc≡0(modp). This occurs if b=0 or c=0, resulting in 2p−1 matrices.
2. If $a
eq 0$, we found there are (p−1)2 such matrices.
Summing these gives (2p−1)+(p2−2p+1)=p2. Subtracting this from the total, the number of matrices where the determinant is not divisible by p is: