# Are there simple methods for calculating the determinant of symmetric matrices?

I've seen that there are lots of exercises about determinants of symmetric matrices in my algebra books. Some are easy and others are a bit more twisted, but the basic problem is almost always the same. I have been trying to come up with a method to calculate these a bit more quickly, since—at least for me—they invariably end with a very ugly stream of numbers and letters.

For example I started with a $$3\times 3$$ matrix like this:

$$A= \begin{pmatrix} a & b & c \\ b & a & b \\ c & b & a \end{pmatrix}$$

which looks fairly simple, but the best I could come up with for the determinant was:

$$2b^2(c-a)+a(a^2-c^2) \quad \text{ or } \quad a(a^2-2b^2-c^2)+2b^2c$$

These look horrific and absolutely not what anyone in his right mind would use. It goes without saying that I haven't even tried this with matrices bigger than $$3\times 3$$. Is there something I have been missing, or is there nothing to do about it?

• $|\mathbf{A}|=a^3+b^2c+b^2c-ac^2-ab^2-ab^2=a^3+2b^2c-ac^2-2ab^2=a(a^2-c^2)-2b^2(a-c)=a(a-c)(a+c)-2b^2(a-c)=(a-c)(a(a+c)-2b^2)$ Dec 11, 2013 at 19:50
• For a $3\times3$ determinant, symmetric or not, there is the fairly simple rule of Sarrus, but there is nothing as simple for larger determinants. Sep 20, 2020 at 22:25

There's not a whole lot you can do to simplify that anymore. In any case, what you've written down is a special case of a symmetric matrix. In general a symmetric $$3 \times 3$$ matrix will have the form:

$$A= \begin{pmatrix} a & b & c \\ b & d & e \\ c & e & f \end{pmatrix}$$

which has a determinant of $$a(df-e^2) + b(ce-bf) + c(be-dc)$$. Even worse-looking. The only time it really gets a lot simpler is if you have zeroes in there. The simplest way to calculate is not to calculate.

• Just one thing: $bce$ appears twice.
– user65203
Jun 1, 2020 at 15:24
• @YvesDaoust Correct, and it's in the equation twice.
– John
Jun 2, 2020 at 16:36
• so then could it be more simple yet: a(df-e^2) +b(2ce-bf) - dc^2 Jan 11, 2021 at 22:59

Edit (July 2021): As suggested in the comment, the answer here calculated the determinant of $$\begin{pmatrix} \ a & b & c \\ b & c & a \\ c & a & b \end{pmatrix},$$ instead of the one in the post.

do R1 --> R1+R2+R3
take out $$(a+b+c)$$ you will end up with
$$=(a+b+c)\begin{pmatrix} \ 1 & 1 & 1 \\ b & c & a \\ c & a & b \end{pmatrix}$$

c1 --> c1-c3
c2 --> c2-c3

$$=(a+b+c)\begin{pmatrix} \ 0 & 0 & 1 \\ b-a & c-a & a \\ c-b & a-b & b \end{pmatrix}$$

expanding along R1:
$$=(a+b+c)(a^2 +b^2 + c^2 -ab-bc-ca)$$

• Used this technique and it seems to simplified things quite alot. :) Jan 4, 2016 at 11:02
• What? You aren't taking the same matrix! Aug 9, 2017 at 17:04
• It's nevertheless a useful trick for people (like me) who have a matrix whose columns contain the same set of numbers. +1'd. Jun 30, 2022 at 9:12

In the more general case of a symmetric matrix $$A= \begin{pmatrix} \color{brown}a & b & c \\ b & \color{brown}d & e \\ c & e & \color{brown}f \end{pmatrix}$$ I quite like the expression for the determinant $$\det(A) = \color{brown}{adf} - (\color{brown}ae^2 + \color{brown}dc^2 + \color{brown}fb^2)+ 2bce \,.$$ It's got a nice symmetry to it in terms of the diagonal entries. In your case where $$a = d = f$$ and $$b = e$$ it'll reduce to $$\color{brown}a^3 - \color{brown}a(b^2 + c^2 + b^2) + 2bcb\,.$$ The analogous presentation for the determinant of the $$4\times 4$$ matrix looks like: \begin{align} A = &\begin{pmatrix} \color{brown}a & b & c & d\\ b & \color{brown}e & f &g \\ c & f & \color{brown}h &i \\ d&g&i&\color{brown}j \end{pmatrix} \\[1em] \implies\quad \det(A) = \;\; &\color{brown}{aehj}\\ -&(\color{brown}{ae}i^2 +\color{brown}{ah}g^2 +\color{brown}{aj}f^2 +\color{brown}{eh}d^2 +\color{brown}{ej}c^2 +\color{brown}{hj}b^2) \\+&2(\color{brown}{a}fgi +\color{brown}{e}cdi +\color{brown}{h}bdg +\color{brown}{j}bcf) \\-&2(bfid + bcgi + cgfd) +(bi)^2 + (cg)^2 + (df)^2 \end{align}

It's not beautiful, but again you can see some symmetry when the sum is sorted by how my factors of each summand are members of the diagonal. And again in your specific case where $$a=e=h=j$$ and $$b=f=i$$ and $$c=g$$ you get a slightly more memorable looking determinant: $$\color{brown}{a}^4 -\color{brown}a^2(3b^2+2c^2+d^2) +4\color{brown}{a}(bdc + bcb) -2(b^3d +b^2c^2+bc^2d) +b^4+c^4+b^2d^2$$

In terms of a trick calculating these determinants, I was thinking of Leibniz's idea of a determinant as the sign-weighted sum over all products of an element from each row (or column) corresponding to an permutation of the symmetric group.

What is “elegant”? If $a \ne 0$ and $M_{i,j}$ is the $(i, j)$ minor of a matrix $M$ (see Wikipedia), then the determinant of the matrix $M$ you present is $(M_{3,3}^2 - M_{1,3}^2)/a$. This is arguably more “elegant”.

I would rather write:

$$(a-c)(a^2 + ac - 2b^2)$$

which clearly reflects that the determinant is $$0$$ if $$a = c$$ (because two rows would be equal). You should try in higher dimensions to see if a pattern emerges and/or search whether some properties of symmetric matrices can be projected into the determinant's expression.

No, as far as I know there is no simple way to do that. (That's probably why we always use computer to do the simple but tedious calculation)

But there is a cool way to do that.

It can be shown that any symmetric matrix $A$ can be decomposed (spectral decomposition) into $$A=\Gamma^T \Lambda \Gamma$$ where $\Gamma$ is an orthogonal matrix ($\Gamma^T\Gamma=I$) and $\Lambda$ is a diagonal matrix.

With this decomposition it is clear $|A|=\prod_{i} \lambda_i$ where $\lambda_i$ is the $i$th diagonal element of $\Lambda$. However, the effort it takes to find $\Gamma$ to diagonalize $A$ is more or less similar to the effort to find the determinant of $A$ directly.

• Actually it's clearly harder to diagonalize a 3x3 symmetric matrix (giving its 3 real eigenvalues) than it is to find the determinant (product of the eigenvalues). The latter is a polynomial of matrix coefficients while orthogonal $\Gamma$ cannot be expressed so simply. Dec 11, 2013 at 21:01

You had a nice symmetric matrix with all diagonal elements equal. That's an especially simple form as others already noted of course. It's maybe worth seeing that your equation is analytically not so crazy as all that and it can be solved to some extent to cough up some useful stuff.

Testing for a zero determinant

Look at what always happens when c=a. Disaster for invertibility. The determinant for that kind of a matrix must always be zero. When you get an equation like this for a determinant, set it equal to zero and see what happens! Those are by definition a description of all your singular matrices.

That's arguably the most useful test to think about straight up because you only have to worry about calculating the value of the determinant if it isn't zero. Another way of saying if your symmetric matrix has all diagonal entries the same as in your original post, you can use your equation to test if that determinant is zero without actually calculating the determinant.

2b2(c−a)+a(a2−c2)= f(a,b,c)

This function might still look awful but it has zeros in other places than the trivial case where a=c. This is also zero where,

2b2(a−c)=a(a2−c2)

Note that: (a2−c2)=(a+c)(a-c) meaning(a-c) can be factored from LHS and RHS,

2b2=a(a+c)

or,

2b2=a2+ac

Which solves for c,

c = (2b2-a2)/a

Or if you prefer b,

b = sqrt(a2+ac)

If either c=a or c = (2b2-a2)/a hold then you're absolutely guaranteed a zero determinant and you don't have to actually work out the determinant from computing anything but (2b2-a2)/a and comparing that to the value of c. Of course this only holds for matrices of the form you posted with all main diagonal elements the same.

Determinants by the extended matrix/diagonals method

If you do want a neat brute force method for working out determinants and in a way that makes it almost impossible to go wrong just because it is so organised, there's the so-called American method. This is hard to beat for simplicty but it does involve some redundancy.

Suppose you have, $$\left[ \begin{array}{ccc} 1&2&3\\ 4&5&6\\ 7&8&9 \end{array} \right]$$

Now switch to augmented matrix notation... take the first two columns and do something that looks utterly redundant but which will end up being really simplifying. Re-write the first two columns all over again to the right of the original matrix, to get something like,

$$\left[ \begin{array}{ccc|cc} 1&2&3&1&2\\ 4&5&6&4&5\\ 7&8&9&7&8 \end{array} \right]$$

If you look at the diagonals which are to the right of the main diagonal and parallel to it, if you were to take the product of any three terms in those three neighbouring diagonals well, just look at them, they are all the positive terms appearing in the determinant, now regrouped into diagonals.

So that's (1 x 5 x 9) + (2 x 6 x 7) + (3 x 4 x 8)=(45)+(84)+(96)=225 and those are the positive terms.

From that you take off all the terms which would be subtracted and lo, you can locate on the three diagonals which are running the other way.

So we'll have to subtract (3 x 5 x 7) + (1 x 6 x 8) + (2 x 4 x 9) = 105 + 48 + 72=225

So the determinant in this case is 225-225 = 0.

It never fails.

This method just regroups the positive and negative terms in the determinant into diagonals. So my own preference for matrices where there are no easy rows or columns to work with, where a matrix isn't very sparse and you can't use other methods to save a lot of time, this more long-winded looking method works pretty rapidly for determinants of any dimension and it is almost impossible to mess this up.

• You should read an introduction to MathJax, like MathJax help and use that to typeset your math. Jul 19, 2016 at 15:16
• Your "American method" works for matrices of dimension 3 only Jul 19, 2016 at 15:29
• anyway the american method = Sarrus law Jul 17, 2021 at 18:39