# determinant of sum of matrices

having A,B,C square matrices of size $n\gt2$, with C = A+B.

If we know that:
$det(A) = 0$, and
B is a diagonal matrix with $det(B)\ne 0$

Then how can one find $det(C)$?

It should be enough for me to prove $det(C)\ne 0$

## 2 Answers

No, you can't find $\det C$. Suppose that$$A=\begin{pmatrix}1&1\\1&1\end{pmatrix}\text{ and that }B=\begin{pmatrix}1&0\\0&1\end{pmatrix}.$$Then $\det A=0$, $\det B\neq0$, and $\det(A+B)=3$. But $\det(0+B)=1\neq3$.

• I am not sure if I get your point. How this is related to the last comment here: math.stackexchange.com/questions/673934/… which says: When n=2, and suppose B has inverse, $det(A+B)=detB+detA+detB .Tr(B^{-1}A)$ I need to know how this can be proved? also seems to me that it holds for n>2 as well (at least for my problem) – Mohsen Goudarzi Dec 28 '17 at 17:15
• @MohsenGoudarzi What I did was to prove that $\det(A+B)$ cannot be computed using only the information that you provided. That answer (which is not a comment) that you mentioned changes nothing. And you made no restriction in your question to the value of n (but it is still false if $n>2$). – José Carlos Santos Dec 28 '17 at 17:31
• yes sorry that is not a comment. That relation I mentioned gives det(A+B) with information I provided (except restrictions on n), I edited my question. can you please elaborate more on your point? you say $det(0+B)=1$: why do you replace A by 0? I do not understand this. – Mohsen Goudarzi Dec 28 '17 at 17:47
• @MohsenGoudarzi That expression doesn't allow you to deduce $\det(A+B)$ only from the information that you provided. What I wrote was that if$$A_1=\begin{pmatrix}1&1\\1&1\end{pmatrix}\text{ and }A_2=\begin{pmatrix}0&0\\0&0\end{pmatrix},$$then $\det(A_1+B)\neq\det(A_2+B)$. Therefore, the value of $\det(A+B)$ cannot be computed just from the knowledge that $\det(A)=0$, that $\det(B)\neq0$, and that $B$ is a diagonal matrix. – José Carlos Santos Dec 28 '17 at 17:52

Counterexample:

Take $A=\begin{pmatrix} 0& 0\\ 0&{-1} \end{pmatrix}$ and $B=\begin{pmatrix} 1&0\\ 0&1 \end{pmatrix}.$

$\det A=0,$ $B$ diagonal, $\det B=1\neq 0.$ But $\det C=0 .$