Let $A$ and $B$ be $n \times n$ matrices. Can $\det(A + B)$ be expressed in terms of $\det(A)$, $\det(B)$, $n$?
-
13Not in general. Even if $A,B$ are $n \times n$ identity matrices, $\det(A+B) = 2^n$ while $\det(A) = \det(B) = 1$, so the connection will depend on $n$ as well... – gt6989b Feb 12 '14 at 16:11
-
4There are special cases, like http://en.wikipedia.org/wiki/Matrix_determinant_lemma – A Blumenthal Feb 12 '14 at 16:13
-
4Also, in light of http://math.stackexchange.com/questions/298454/the-determinant-of-a-sum-of-matrices , I think such a formula will always depend on more than just $\det A, \det B$ – A Blumenthal Feb 12 '14 at 16:14
-
2@ABlumenthal I'm having a hard time comprehending your link although it seems to answer my question. Can you explain it to me? – Sidharth Ghoshal Feb 14 '14 at 05:54
-
1I hope I am not making any mistake but what the link says for this case is that determinant of sum, is sum of determinants of $2^n$ matrices which are constructed by choosing for each column i either ith column of A or ith column of B (all possible choices are $2^n$ if you think about it). – kon psych Apr 12 '16 at 07:26
6 Answers
When $n=2$, and suppose $A$ has inverse, you can easily show that
$\det(A+B)=\det A+\det B+\det A\,\cdot \mathrm{Tr}(A^{-1}B)$.
Let me give a general method to find the determinant of the sum of two matrices $A,B$ with $A$ invertible and symmetric (The following result might also apply to the non-symmetric case. I might verify that later...). I am a physicist, so I will use the index notation, $A_{ij}$ and $B_{ij}$, with $i,j=1,2,\cdots,n$. Let $A^{ij}$ donate the inverse of $A_{ij}$ such that $A^{il}A_{lj}=\delta^i_j=A_{jl}A^{li}$. We can use $A_{ij}$ to lower the indices, and its inverse to raise. For example $A^{il}B_{lj}=B^i{}_j$. Here and in the following, the Einstein summation rule is assumed.
Let $\epsilon^{i_1\cdots i_n}$ be the totally antisymmetric tensor, with $\epsilon^{1\cdots n}=1$. Define a new tensor $\tilde\epsilon^{i_1\cdots i_n}=\epsilon^{i_1\cdots i_n}/\sqrt{|\det A|}$. We can use $A_{ij}$ to lower the indices of $\tilde\epsilon^{i_1\cdots i_n}$, and define $\tilde\epsilon_{i_1\cdots i_n}=A_{i_1j_1}\cdots A_{i_nj_n}\tilde\epsilon^{j_1\cdots j_n}$. Then there is a useful property: $$ \tilde\epsilon_{i_1\cdots i_kl_{k+1}\cdots l_n}\tilde\epsilon^{j_1\cdots j_kl_{k+1}\cdots l_n}=(-1)^sl!(n-l)!\delta^{[j_1}_{i_1}\cdots\delta^{j_k]}_{i_k}, $$ where the square brackets $[]$ imply the antisymmetrization of the indices enclosed by them. $s$ is the number of negative elements of $A_{ij}$ after it has been diagonalized.
So now the determinant of $A+B$ can be obtained in the following way $$ \det(A+B)=\frac{1}{n!}\epsilon^{i_1\cdots i_n}\epsilon^{j_1\cdots j_n}(A+B)_{i_1j_1}\cdots(A+B)_{i_nj_n} $$ $$ =\frac{(-1)^s\det A}{n!}\tilde\epsilon^{i_1\cdots i_n}\tilde\epsilon^{j_1\cdots j_n}\sum_{k=0}^n C_n^kA_{i_1j_1}\cdots A_{i_kj_k}B_{i_{k+1}j_{k+1}}\cdots B_{i_nj_n} $$ $$ =\frac{(-1)^s\det A}{n!}\sum_{k=0}^nC_n^k\tilde\epsilon^{i_1\cdots i_ki_{k+1}\cdots i_n}\tilde\epsilon^{j_1\cdots j_k}{}_{i_{k+1}\cdots i_n}B_{i_{k+1}j_{k+1}}\cdots B_{i_nj_n} $$ $$ =\frac{(-1)^s\det A}{n!}\sum_{k=0}^nC_n^k\tilde\epsilon^{i_1\cdots i_ki_{k+1}\cdots i_n}\tilde\epsilon_{j_1\cdots j_ki_{k+1}\cdots i_n}B_{i_{k+1}}{}^{j_{k+1}}\cdots B_{i_n}{}^{j_n} $$ $$ =\frac{\det A}{n!}\sum_{k=0}^nC_n^kk!(n-k)!B_{i_{k+1}}{}^{[i_{k+1}}\cdots B_{i_n}{}^{i_n]} $$ $$ =\det A\sum_{k=0}^nB_{i_{k+1}}{}^{[i_{k+1}}\cdots B_{i_n}{}^{i_n]} $$ $$ =\det A+\det A\sum_{k=1}^{n-1}B_{i_{k+1}}{}^{[i_{k+1}}\cdots B_{i_n}{}^{i_n]}+\det B. $$
This reproduces the result for $n=2$. An interesting result for physicists is when $n=4$,
\begin{split} \det(A+B)=&\det A+\det A\cdot\text{Tr}(A^{-1}B)+\frac{\det A}{2}\{[\text{Tr}(A^{-1}B)]^2-\text{Tr}(BA^{-1}BA^{-1})\}\\ &+\frac{\det A}{6}\{[\text{Tr}(BA^{-1})]^3-3\text{Tr}(BA^{-1})\text{Tr}(BA^{-1}BA^{-1})+2\text{Tr}(BA^{-1}BA^{-1}BA^{-1})\}\\ &+\det B. \end{split}
- 1,993
- 2
- 14
- 18
-
20This, in my opinion, is the better answer, as it not only falsifies the question, but also salvages the false statement with an interesting and relevant identity. (+1) – Franklin Pezzuti Dyer Sep 22 '18 at 22:09
-
3
-
@Frpzzd Unfortunately, I did not find any interesting result for $n=3$. – Drake Marquis Oct 08 '18 at 01:24
-
-
5@FranklinPezzutiDyer, I've found a fine equality for the determinant of the sum of 3x3 matrices: $\det{\left( A + B \right)} = \det{A} + \det{A} \cdot Tr\left( A^{-1} \cdot B \right) + \det{B} \cdot Tr\left( B^{-1} \cdot A \right) + \det{B}$. I don't have a strict symbolic proof, but I've checked it using SymPy and this works well:
A = Matrix(3, 3, symbols('a:3:3')); B = Matrix(3, 3, symbols('b:3:3')); expand(cancel((A + B).det())) == expand(cancel( A.det() + A.det() * (A.inv() * B).trace() + B.det() * (B.inv() * A).trace() + B.det() ))(online editor won't handle this -- check it locally). – Charlie Feb 03 '20 at 20:14 -
1
-
Does your formula also hold when $A$ is $i$ times a symmetric real matrix? It seems so, but you just mentioned symmetric and I was not sure if you are considering complex matrices as well. – Idontgetit Oct 20 '22 at 11:01
-
@MathMath In my mind, I treated $A,B$ real matrices. Probably, there is no issue with complex matrices, as long as the definition of the determinant takes the same form as in the real case. So is the determinant of a complex matrix required to be real? – Drake Marquis Oct 21 '22 at 09:31
-
1@Anon21 It is true that formally, this expression is not symmetric in $A$ and $B$. But I do not find anything wrong with the derivation. – Drake Marquis Oct 21 '22 at 09:33
-
1@DrakeMarquis so $\det (A+B) \neq \det (B+A)$? I am not saying its not, but it seems hard to believe. – Anon21 Nov 04 '22 at 17:25
-
1@DrakeMarquis Does this inequality have a name? (or do you know a reference)? – AB_IM Jun 20 '23 at 13:50
-
-
When $n\ge2$, the answer is no. To illustrate, consider $$ A=I_n,\quad B_1=\pmatrix{1&1\\ 0&0}\oplus0,\quad B_2=\pmatrix{1&1\\ 1&1}\oplus0. $$ If $\det(A+B)=f\left(\det(A),\det(B),n\right)$ for some function $f$, you should get $\det(A+B_1)=f(1,0,n)=\det(A+B_2)$. But in fact, $\det(A+B_1)=2\ne3=\det(A+B_2)$ over any field.
- 149,263
-
3For the operation $\oplus$ see, for example, https://en.wikipedia.org/wiki/Matrix_addition#Direct_sum – Michael Levy Mar 02 '22 at 23:29
-
1@Esgeriath The $2$ in $n\ge2$ is not a typo. When $n=2$, the zero sub-blocks in $B_1$ and $B_2$ are void. This is a common convention. – user1551 Feb 26 '25 at 06:58
-
From the MAA (mathematics association of america) there is a general formula here. https://web.archive.org/web/20240324155831/https://maa.org/sites/default/files/0746834207570.di020741.02p0009e.pdf
There is a proof in the article, but in general: $$ \det(A + B) = \sum_r \sum_{\alpha, \beta} (-1)^{s(\alpha) + s(\beta)} \det(A[\alpha | \beta]) \det(B(\alpha | \beta))$$ where $r$ runs over the integers from $0,\dots,n$; then the inner sum runs over all strictly increasing sequences $\alpha$ and $\beta$ of length $r$ chosen from $1,\dots,n$.
$A[\alpha|\beta]$ is the $r$ by $r$ square submatrix of $A$ lying in rows $\alpha$ and columns $\beta$.
$B(\alpha|\beta)$ is the $(n-r)$-square submatrix of $B$ lying in rows complementary to $\alpha$ and columns complementary to $\beta$.
$s(\alpha)$ is the sum of the integers in $\alpha$.
- 19,173
- 311
To add to Drake Marquis' nice answer, yet another formula for the $n = 2$ case is
$\det(A + B) = \det(A) + \det(B) + \text{tr}(A)\text{tr}(B) - \text{tr}(AB).$
The proof is given as follows:
$\det(A + B) = (A_{11} + B_{11})(A_{22} + B_{22}) - (A_{12} + B_{12})(A_{21} + B_{21})$
which expands into
$(A_{11}A_{22} - A_{12}A_{21}) + (B_{11}B_{22} - B_{12}B_{21}) + A_{11}B_{22} + B_{11}A_{22} - A_{12}B_{21} - B_{12}A_{21}.$
This can be written
$\det(A) + \det(B) + A_{11}B_{22} + B_{11}A_{22} - A_{12}B_{21} - B_{12}A_{21}.$
We now just need to verify the cross-terms. Now
$\text{tr}(A)\text{tr}(B) = (A_{11} + A_{22})(B_{11} + B_{22})$
which expands to
$A_{11}B_{11} + A_{11}B_{22} + A_{22}B_{11} + A_{22}B_{22}$
and
$\text{tr}(AB) = A_{11}B_{11} + A_{12}B_{21} + A_{21}B_{12} + A_{22}B_{22}.$
Therefore the difference $\text{tr}(A)\text{tr}(B) - \text{tr}(AB)$ is the cross term, completing the proof.
- 120
- 101
-
2Nice formula. A short index-free proof can be given using the identity 2det(A) = (tr A)^2- tr(A^2) (which can be checked by writing det and tr in terms of eigenvalues) and linearity of trace. – Jairo Bochi Aug 16 '23 at 15:34
Assume $$X=[x_1,x_2], Y=[y_1,y_2]$$ $$|X+Y|=|x_1,x_2|+|y_1,x_2|+|x_1,y_2|+|y_1,y_2|$$
By inspection, select columns from one or the other exclusively form a determinant and sum the determinants.
We need an index and a column selection matrix.
Assume $k$ runs from $1$ to $2^N$ $N=\text {rank}[X+Y]$.
Also, k=Σbkj2^(j-1), bkj the bits of k.
A diagonal matrix is formed with bkj. It is the Bkd below.
Define also its complement Bkcd=I-Bkd
Then |X+Y|=Σk|Χ * Βkd+Y * Bkcd|
It is not perfect but you can get these matrices and do transformations e.g. where matrix pencils are involved (not just characteristic polynomials in one variable, or nonlinear eigenvalues etc.)
Also inversion of pencils based on these matrices.
It is not a simple sum, it involves 2^N terms from which some by chance may be zero.
- 40,943
For $n=2$, the identity follows from $$\det(A+\lambda B)=\det(A)+\operatorname{Tr}(A \operatorname{adj}(B))\lambda + (\det B) \lambda^2.$$
- 1