Let A be a square matrix of order $3$ with integer entries such that $\det(A)=1$. 
*

*What is the maximum possible number of entries of A that  are  even? What if A is a matrix of order n?

*What is the maximum possible number of entries of A that  are  PRIMES? What if A is a matrix of order n?
This question was asked  during my class test and I was unable to do this.
Please help me in doing this.
 A: For the first question, you can show that $I_3$ is an example of such a matrix with $6$ even entries. If there are $7$ or more event entries, then necessarily there is a row with only even entries, calculate your determinant by expanding this line, it is a sum of even terms, thus the determinant is even and can't be $1$.
Thus $6$ is the maximum possible number of entries of A that are even and such as $\det(A)=1$.

The generalisation for matrices of order $n$, for the first question is $n^2-n$, you can prove this with same reasoning that in the case $3 \times 3$ : $I_n$ has $n^2-n$ even entries and its determinant is $1$. And if your matrix has more that $n^2-n$ even entries then there is necessary a whole row with even entries and you can expand your determinant from this row and thus it will be even and so different of $1$.
A: For first part answer is $6$. You cab take $A$ as $$A=\begin{bmatrix} 1&0&0\\b&a&ac-1\\d&1&c\end{bmatrix}$$ where $a,b,c,d$ are any even number. Now consider $$e_3=6,$$
$$e_4=e_3+2(4-1)$$
$$e_n=e_{n-1}+2(n-1)$$ where $e_n$ is no. of even entries when $A$ is of order $n\ge3$.
For second part take $A$ as $$A=\begin{bmatrix} 1&0&0\\a&p_1&p_2\\b&p_3&p_4\end{bmatrix}$$ where $a,b$ are any prime number and $p_1p_4-p_3p_2=1$ it is possible to find such primes e.g take $p_1=3,p_4=5,p_3=2,p_2=7$. Now consider $$p_3=6,$$
$$e_4=e_3+(4-1)$$
$$e_n=e_{n-1}+(n-1)$$ where $p_n$ is no. of prime entries when $A$ is of order $n\ge3$.
A: To a matrix of order 3, maximum possibility of even entries is 6 ( take identity matrix of order 3) but as you put even entries on more than 6 places then you can find a row consisting of even entries along which you can take determinant.We can also generalize this for order n, may be possibility for maximum even entries is n^{2}-n( which is Identity matrix)
