# True or false? We have that $\text{det(A)} \neq 0$ for every diagonal matrix $A \in \mathbb{R}^{n \times n}$

Let $n \in \mathbb{N}.$

We have that $\text{det(A)} \neq 0$ for every diagonal matrix $A \in \mathbb{R}^{n \times n}$. Is this statement true or false? State why.

I don't know if zero is excluded when they say $n \in \mathbb{N}$. But if it's included then the statement is wrong because let $n=0$ then determinant will be zero too.

If zero is excluded, then the statement will be true because we only have that diagonals $\neq$ zero which means if we split the matrix to vectors, we will get linearly independent vectors. And determinant of linearly independent vectors is $\neq$ zero.

What do you think about it? Did I do it correctly for both cases?

• Note that the zero matrix is diagonal. What is its determinant? – celtschk Mar 11 '17 at 10:28
• I did an English mistake.. Determinant will be zero then and the statement will be false. – cnmesr Mar 11 '17 at 10:31

A matrix $A=[a_{ij}]$ is said to be diagonal if, when $i\ne j$, we have $a_{ij}=0$.
It is a common misunderstanding to interpret this as imposing $a_{ii}\ne0$, but this is wrong: no condition is set on $a_{ii}$. For instance, the matrix $$\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$$ is diagonal, because $a_{12}=0$ and $a_{21}=0$. Nothing else is required in order to satisfy the definition.
The same misunderstanding is often seen with triangular matrices: the matrix \begin{bmatrix} 2 & 1 & 0 \\ 0 & -1 & 1 \\ 0 & 0 & 0 \end{bmatrix} is upper triangular, notwithstanding the fact that $a_{13}=0$ and $a_{33}=0$. What's needed in order that a matrix is upper triangular is that $a_{ij}=0$ for $i>j$; no condition is imposed on $a_{ij}$ for $i\le j$.
The statement is always false, because the $0$ matrix is a diagonal matrix with $det A =0$. Moreover, every diagonal matrix with a $0$ on the diagonal will have $det A = 0$.
$$\det\begin{pmatrix} a_1 & 0 & ... & 0\\ 0 & a_2 & ... & 0\\ \vdots & \ddots & \ddots & 0\\ 0 & ... & 0 & a_n \end{pmatrix} =\prod\limits_{i=1}^n a_i.$$ Therefore, the determinant is nonzero iff all diagonal entries are nonzero.