# Hill Cipher: Determining the number of bad keys

Find the number of matrices whose determinant is a multiple of 13 where the first column is not a multiple of 13 but the second column is a multiple of the first modulo 13.

Here's what I have done:

The number of combinations when the first column is not multiple of 13 is $$(26^2-2^2) = 2^2×(13^2-1)$$ The number of combinations when the second column is multiple of 13 is $$2^2$$ Thus, the total combinations: $$2^4 × (13^2 - 1)$$

The solution given is: $$2^4 × (13^2 - 1) x 13$$