# Can we infer that $\det(A+D)$ is always $\neq 0$, with $D$ diagonal matrix and $\det A=0$?

Let $A$ a $n\times n$ matrix, with $\det A=0$. Let $D$ a $n\times n$ diagonal matrix. Can we infer that $\det(A+D)$ is always $\neq 0$? I think the answer is "yes", but I do not know how to prove it.

• Do you want to assume that $D$ is not the zero matrix? – Bobby Grizzard Jul 19 '15 at 19:23
• @BobbyGrizzard hah. That is an even more trivial counterexample than mine. – JMoravitz Jul 19 '15 at 19:24
• @JMoravitz Actually, given the assumption $\det A = 0$, it is exactly your counterexample. – Strants Jul 19 '15 at 20:13
• @Strants not necessarily. My counterexample was more general and allowed for $D$ that are not the zero matrix, and as pointed out in a formerly deleted comment, when $\det D\neq 0$ you would have $\det A\neq 0$, but of course all we need is at least one case to disprove the claim. Bobby's answer is nice because in every case that $\det A=0$ and $D$ is the zero matrix, you have $\det (A+D)=\det A=0$. – JMoravitz Jul 19 '15 at 20:28

Consider for trivial counterexample $A=-D$

• I like counter examples... Vote up! – johannesvalks Jul 19 '15 at 19:22

A non - trivial counterexample with $\det A = 0$ and $\det D \neq 0$:

Let $$A =\begin{bmatrix} 0 & 0 \\ 1 & 2 \end{bmatrix}$$ and $$D = \begin{bmatrix} -1 & 0 \\ 0 & -2\end{bmatrix}.$$

Then, $$A+D =\begin{bmatrix} -1 & 0 \\1 & 0 \end{bmatrix},$$ with $\det(A+D) = 0$.

Look at a diagonal matrix $D = \text{diag} (d_1, d_2, \ldots, d_n)$ with $d_i \ne 0$, $1 \le i \le n$; then in fact $\det D \ne 0$. Form $A$ from $D$ by replacing at least one $d_i$ with $-d_i$ and at least one $d_j$, $j \ne i$, by $0$· Then $\det A = 0$ and $D + A$ is a diagonal matrix with (at least) $(D + A)_{ii} = 0$, whence $\det (D + A) = 0$.