73

Let $M$ be a symmetric $n \times n$ matrix.

Is there any equality or inequality that relates the trace and determinant of $M$?

TPArrow
  • 976
  • 1
    Also probably not what you're looking for but I feel should be here: $\det(M)=\mathop{\mathrm{tr}}(\bigwedge^n M)$. $M$ need not be symmetric. – blargoner Nov 23 '22 at 14:32

7 Answers7

92

Not exactly what you're looking for but I would be remiss not to mention that for any complex square matrix $A$ the following identity holds:

$$\det(e^A)=e^{\mbox{tr}(A)} $$

  • 18
    This is not really an answer to the question. – Mariano Suárez-Álvarez Jan 04 '17 at 19:50
  • 6
    @MarianoSuárez-Álvarez I'm sure I'm missing something obvious, but why doesn’t this answer the question? (I up voted it because it was exactly what I was looking for, but should I?) – Clumsy cat Apr 14 '17 at 11:20
  • 6
    @TheoreticalPerson Strictly speaking, this does not answer the question because the equation does not relate $\tr(A)$ with $\det(A)$. However, the equation is certainly important and elegant, and in some sense one can argue that it really answers "the spirit" of the question. – leonbloy Jul 28 '17 at 19:50
  • how come it doesn't answer how trace and determinant isn't related? – Rainb Jan 24 '20 at 09:45
  • Does it mean, absolute value of the exponent is equal to the exponent of the real part? – Anixx Feb 11 '21 at 23:58
  • @Rainb Because it relates $\det(e^A)$ with $\text{tr}(A)$ and not $\det(A)$ with $\text{tr}(A)$. – Tera Feb 03 '22 at 17:11
  • 1
    The special linear Lie algebra $\mathfrak {sl}(n,\mathbb F)$ of $n \times n$ matrices of trace $0$ generates the special linear group (matrices with determinant $1$). – Antoni Parellada Nov 18 '22 at 23:43
80

The determinant and the trace are two quite different beasts, little relation can be found among them.

If the matrix is not only symmetric (hermitic) but also positive semi-definite, then its eigenvalues are real and non-negative. Hence, given the properties ${\rm tr}(M)=\sum \lambda_i$ and ${\rm det}(M)=\prod \lambda_i$, and recalling the AM GM inequality, we get the following (probably not very useful) inequality:

$$\frac{{\rm tr}(M)}{n} \ge {\rm det}(M)^{1/n}$$

(equality holds iff $M = \lambda I$ for some $\lambda \ge 0$)

Much more interesting/insightful/useful are the answers by Owen Sizemore and Rodrigo de Azevedo.

leonbloy
  • 66,202
  • n is the order of the matrix ($M_{n\times n}$) right? – TPArrow Jan 04 '17 at 14:41
  • 1
    Yes, I'm following the question statement. – leonbloy Jan 04 '17 at 14:42
  • What does positive definite mean here can anyone tell me? Matrix without a symmetric one can be positive definite ? – DSR Jan 23 '18 at 06:05
  • It is actually useful used in conjunction with Jacobi formula if you have a matrix ODE and want to bound the determinant of that matrix. Indeed, $d(\log \det M)/dt = tr(M^{-1} dM/dT) \geq n \det (M)^{-1/n} \det(dM/dt)^{1/n}$. – Joce Sep 25 '24 at 07:12
  • 1
    This inequality was used here to prove that $$\operatorname{tr} ({\bf P}) - \log \det({\bf P}) \geq n $$ for ${\bf P} \succ {\bf O}$ – Rodrigo de Azevedo Feb 15 '25 at 20:28
78

The trace of $\bf M$ is the directional derivative of the determinant in the direction of $\bf M$ at ${\bf I}_n$, i.e.,

$$ \det \left( {\bf I}_n + h {\bf M} \right) = 1 + h \, \mbox{tr} ({\bf M}) + O \left( h^2 \right) $$

In Tao's words, "near the identity, the determinant behaves like the trace"$^\color{red}{\star}$. More generally,

$$\det( {\bf A} + h {\bf B} ) = \det({\bf A}) + h \, \mbox{tr} \left( \mbox{adj} ({\bf A}) \, {\bf B} \right) + O \left(h^2\right)$$

which is a variation of Jacobi's formula. Note that it is not required that $\bf M$ be symmetric.


$\color{red}{\star}$ Terence Tao, Matrix identities as derivatives of determinant identities, January 13, 2013.

  • 2
    While this is true, it has nothing to do with the question! – Mariano Suárez-Álvarez Jan 04 '17 at 19:49
  • 36
    The OP asked for a relation between determinant and trace. I gave him one. Nowhere was it written that derivatives were not allowed. – Rodrigo de Azevedo Jan 04 '17 at 19:55
  • 6
    He wants an inequality or an equality involving the trace and the determinant of a symmetric matrix. What you wrote does not provide that. – Mariano Suárez-Álvarez Jan 04 '17 at 20:03
  • 2
    @RodrigodeAzevedo "the OP asked for relation between determinant and trace." Not. "the trace and determinant of M", the determinant and the trace of the same matrix (linear operator). – vesszabo Jan 11 '17 at 14:27
  • For the second formula, does one need $A$ to be invertible? – Danilo Gregorin Afonso Dec 19 '24 at 15:48
  • 1
    @DaniloGregorinAfonso I haven't touched this material in a long time and would need a few days to get back in shape. From Wikipedia,"holds for all matrices, since the set of invertible linear matrices is dense in the space of matrices", but can one trust Wikipedia. If you are still interested in the need for invertibility, you can ask a question on Math SE. It is likely that a similar question has been asked already and your question will be swiftly closed as a duplicate, which would be a nice outcome. – Rodrigo de Azevedo Jan 03 '25 at 13:52
31

Due to OP's fairly general formulation there's diverse bunch of answers by now. In addition to these, I'd like to mention some concrete relations expressing the determinant in terms of traces. They hold without the symmetry hypothesis, just assume dealing with a general complex matrix.

Despite being "quite different beasts", both $\det(M)$ and $\operatorname{tr}(M)$ of an $n\times n$ matrix $M$ are given by some $n$-variable symmetric polynomial, evaluated at the eigenvalues of $M$.

For any fixed matrix size $n$ there's a polynomial in $n$ variables, of total degree $n$, which yields $\det(M)$ when evaluated at $\left(\operatorname{tr}(M^n),\operatorname{tr}(M^{n-1}),\ldots,\operatorname{tr}(M)\right)$: $$ \det M\; =\; \begin{cases} \operatorname{tr}M & n=1\\[1.67ex] \frac{1}{2}\big((\operatorname{tr}M)^2 - \operatorname{tr}\left(M^2\right)\big) & n=2\\[1.67ex] \frac{1}{6}\big((\operatorname{tr}M)^3 - 3\operatorname{tr}\left(M^2\right)(\operatorname{tr}M) + 2\operatorname{tr}\left(M^3\right)\big) & n= 3\\[1.67ex] \quad\ldots & n\ge4 \end{cases} $$

Case $\mathbf{n=1}$ is clear.

$\mathbf{n=2}$ is straightforward when applying Cayley-Hamilton to $M$ $$ M^2\:-\:(\operatorname{tr}M)\:M\:+\:(\det M)\pmatrix{1&0\\ 0&1}\;=\;\pmatrix{0&0\\0&0} $$ and taking the trace.
Referring to Paul's answer/example featuring $M=\left(\begin{smallmatrix}1&k\\ k&1\end{smallmatrix}\right)$, thus $M^2=\left(\begin{smallmatrix}1+k^2&2k\\ 2k&1+k^2\end{smallmatrix}\right)$,
one obtains $$\det M\;=\;\frac{1}{2}\big(4-2(1+k^2)\big) = 1-k^2$$ for the sake of illustration, presumably not the quickest way towards $\det(M)$
(the parameter has been renamed to $k$ since $n$ denotes the matrix size).

Cases $\mathbf{n\ge3}$ get more expensive $\ldots$ and are available:
A suitable entry point is the corresponding subsection in the Wikipedia entry on determinants.


If you clicked the preceding link then you may scroll down just a bit to get into a det-tr-inequality for a positive-definite matrix, also worthwhile as answer to the OP. Or skip directly down to it ;-)

Hanno
  • 6,776
29

No, there is not. Consider the matrix with parameter $n$ $$\begin{bmatrix} 1 & n \\ n &1 \\ \end{bmatrix}$$ The trace is 2, while the determinant is $1-n^2$. You can vary $n$ to violate any possible inequality between the trace and the determinant.

Paul
  • 8,314
23

Up to sign, the trace and determinant of an $n \times n$ matrix are coefficients of its characteristic polynomial (specifically, the coefficients in degrees $n-1$ and $0$ respectively).

The only constraint that the matrix being symmetric adds is that the characteristic polynomial is totally real — that is, all of its roots are real.

(note every totally real polynomial is a characteristic polynomial; e.g. of the diagonal matrix whose entries are the roots)

Thus, your problem is equivalent to

Let $f$ be a monic polynomial of degree $n$ whose roots are all real. Is there any relationship between the coefficient in degree $n-1$ and the constant coefficient?

I believe you can only say anything when $n \leq 2$. When $n=2$, the requirement that the roots be real implies that $\mathrm{tr}(M)^2 \geq 4 \det(M)$.

  • 1
    Just to elaborate on the last point for the OP's benefit, the coefficients of the characteristic polynomial for $n = 2$ are, up to sign, exactly $\operatorname{tr} M$ and $\det M$; looking at the discriminant gives the indicated inequality. For higher $n$, there are more terms in the minimal polynomial. – anomaly Jan 04 '17 at 18:31
  • +1 I was looking through the answers to post exactly this if no one had already! – user541686 Jan 06 '17 at 11:30
9

The only relation I can think of is this one : Since the matrix $A$ is symetric, it is diagonalizable, thus it can be written $A = P^{-1}DP$ where $D$ is diagonal and $P$ is invertible. Therefore $$\det A = \prod_{i = 1} ^n \lambda_i$$ and $$tr A = \sum_{i = 1} ^n \lambda_i$$ where $\lambda_i$ is an eigenvalue.

Some inequalities can be found between the sum and the product.

Blencer
  • 684
  • 1
    Note that these equalities are true in general and do not require symmetry or diagonalizability; this can i.e. be seen by trigonalisation in C. – Maxim Jan 04 '17 at 15:37
  • You're right, this comes from the characteristic polynomial. – Blencer Jan 04 '17 at 15:41
  • 5
    Another way of expressing this relationship: $$\left .\frac {d}{d\lambda} \det(A + \lambda I)\right |_{\lambda = 0} = \operatorname{tr}(A)$$ – Paul Sinclair Jan 04 '17 at 17:37
  • 1
    @PaulSinclair No, the derivative should be the trace of the adjugate of $A$ rather than the trace of $A$. – user1551 Jan 06 '17 at 16:13
  • @user1551 - Gah - you're right. What I was intending is $$\left .\frac{1}{(n-1)!}\frac {d^{n-1}}{d\lambda^{n-1}} \det(A + \lambda I)\right |_{\lambda = 0} = \operatorname{tr}(A)$$, but I went for the wrong coefficient of the characteristic polynomial. – Paul Sinclair Jan 06 '17 at 17:37