TITLE: A problem on condition $\det(A+B)=\det(A)+\det(B)$
QUESTION [19 upvotes]: Let $A$ be a matrix $n\times n$ matrix such that for any matrix $B$ we have $\det(A+B)=\det(A)+\det(B)$. Does this imply that $A=0$? or $\det(A)=0$?

REPLY [6 votes]: We are going to prove that $A=0$.
Let $A= (a_{ij})$. First it is obvious that $\det(A)=0$.
Claim 1 There exists an $i$ so that $a_{ii}=0$.
Define $B=(b_{ij})$ where $b_{ij}=a_{ij}$ if $j>i$ and $0$ otherwise. (Thus $B$ is 0 on the diagonal and under and 
Then $\det(A-B)=\det(A)+(-1)^n \det(B)=0\pm 0=0$.
Since $A-B$ is lowertriangular, $\det(A-B)$ is the product of the diagonal entries and thus $a_{11}...a_{nn}=0$.
Claim 2 $a_{11}=..=a_{nn}=0$.
Proof. 
Let $c_{ij}=a_{ij}$ if $j>i$ and $c_{ij}=0$ if $j<i$.
Now, we define $c_{ii}=0$ if $a_{ii}\neq 0$ and $1$ otherwise.
Then, by construction $A-C$ is an invertible lower triangual matrix, and $C$ is an upper triangular matrix. 
Then 
$$0 \neq \det(A-C)=\det(A)+(-1)^n\det(C)=\pm c_{11}c_{22}...c_{nn}$$
This proves that $c_{ii}\neq 0 \Rightarrow a_{ii} = 0$ for all $i$.
Claim 3 $A=0$. 
Proof: Let $C$ be any invertible square matrix. Now, for any square matrix $B$ we have
$$\det(CA+B)=\det(C) [\det (A+C^{-1}B)]=\det(C) [\det (A)+\det(C^{-1}B)]=
\det(C) \det (A)+ \det(C) \det(C^{-1}B)=\det(CA)+\det(B)$$
This proves that $CA$ has the same property for all invertible $C$, and thus, for any invertible matrix $C$ all the diagonal entries of $CA$ are $0$. [same result can be proven for $AC$].
To complete the exercise all you need to do is prove the following lemma, which is easy (trivial if you know permutation or elementary matrices.):
Lemma Let $A$ be a matrix so that for all invertible matrices $C$, the diagonal entries of $CA$ are all $0$. Then $A=0$.

Second proof Let $J$ be the cannonical form of $A$. Then exactly as in claim 3, $J$ has the same property. 
Let $\lambda_1,..,\lambda_n$ be the eigenvalues of $A$ and let $D$ be any diagonal matrix with entries $x_1,..,x_n$.
Then $\det(J+D)=\det(J)+\det(D)$  yields
$$(\lambda_1+x_1)...(\lambda_n+x_n)=\lambda_1...\lambda_n+x_1...x_n$$
in ${\mathbb C}[X_1,..,X_n]$. It is trivial to conclude from here that $\lambda_1=..=\lambda_n=0$
, esspecially since we already know that $\det(A)=0$.
This shows  that either $J=0$, or $J$ has some non zero entries, and all such extries appear in the diagonal above the main diagonal. But then by adding a matrix with at most $n-1$ non-zero elements, we can create an invertible matrix, which contradicts $\det(J+B)=\det(J)+\det(B)$.