# Problem of the Week, #116

A colleague Bill Wardlaw (March 3, 1936-January 2, 2013) used to create a “Problem of the Week” for his students, giving a prize of a cookie if they could solve it. Here is one of them.

## PROBLEM 116

Bob invites Joe to see his new program, which prints $2 \times 2$ matrices with random integer entries. (These entries are as likely to be even as to be odd.) Joe, being a bit of a gambler, wants to bet Bob a dollar that the next matrix will have an even determinant. Should Bob take the bet? What is the probability that the next matrix will have an even determinant?

Note:
The determinant of the 2 x 2 matrix

$A = \left( \begin{array}{cc} a & b \\ c & d \\ \end{array} \right)$

is given by $det(A) = ad - bc$.

What is the probability that the determinant of an $n \times n$ matrix with randomly chosen integer entries is divisible by the prime number $p$?
(Assume that the residues $0, 1, 2, ... , p-1$ are equally likely for each integer entry.)