# Determinant of a matrix with odd diagonal and even entries

I'm trying the solve the following problem linear algebra problem and I'm not sure where to begin:

Let $B$ be a square matrix with n columns and integer entries. This matrix is constructed so that all diagonal entries are odd and all other entries are even. We wish to demonstrate that $\det(B) \neq 0$.

My knee jerk is to separate $B$ into even and odd matrices $B_{even}$ and $B_{odd}$, where $B_{odd}$ will be diagonal and have a nonzero determinant. But I'm not sure where to go from there.

The determinant is the sum of products of elements taken from one column and one row. All of these products are even except one, that taken from the diagonal. Thus $\det B$ is odd. Alternatively, you could use induction and expand along the first row.
I think that the best way to show that is by using the fact that if a square matrix $B$ has integer entries then: $$(det(B)) mod \;2=det(B\; mod\: 2)$$ $B \;mod \; 2=I$ and so $0 \neq det(I)=det(B \; mod \; 2)=det(B) \; mod \; 2$, so we have that $det(B) \neq 0.$
• Can you please tell me why : $(det(B)) mod \;2=det(B\; mod\: 2)$? – Koro May 12 at 15:19
$$B = \begin{bmatrix} \color{red}{odd} & even & \dots & even\\ even & odd & \dots & even \\ \vdots & \ddots & \dots & even\\ even & even &even & odd \end{bmatrix}$$
$$|B| = \color{red}{odd} + even+even+..........+even=odd\ne 0$$