# Simplified method for symmetric matrix determinants

Preparing for my final exams I have been doing all the exercises in my algebra book. I've seen that there are lots and lots of exercises about determinants of symmetric matrices. 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 something to do these a bit more quickly, since (at least for me) they invariably end with a very ugly stream of numbers and letters, and they are really tedious and time-consuming. I've been two days with the sensation that (being as the matrices are symmetric) there must be a way/catch/method/trick to calculate the determinants in a more elegant way, but I haven't been able to come up with anything.

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 was:

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

and

$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.

Granted, my math level is basic (I very rarely use linear algebra and calculus out of college, so I tend to completely forget them from year to year) and I don't have many tools to do this, so I don't really know if I'm trying something that is too much for my level or if it simply can't be done. I've consulted all the books about matrices in the college library, but no one mentions anything special about calculating determinants for symmetric matrices. Is there something I have been missing, or is there nothing to do about it?

• Note that the determinant of your $3\times 3$ matrix is a homogenous polynomial of degree 3 in $a,b,c$. So the first expression you give must be incorrect, since it contains a term of degree 5, namely $a^3 c^2$. – hardmath Dec 11 '13 at 19:41
• You are right, I missed a sign there. – Achifaifa Dec 11 '13 at 19:46
• $|\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)$ – K. Rmth Dec 11 '13 at 19:50

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.

• I was afraid this would be the answer... Thanks for clearing it up! :) – Achifaifa Dec 11 '13 at 21:33

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. :) – Entalpi Jan 4 '16 at 11:02
• What? You aren't taking the same matrix! – YvesgereY Aug 9 '17 at 17:04

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. – hardmath Dec 11 '13 at 21:01

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”.

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. – Henrik Jul 19 '16 at 15:16
• Your "American method" works for matrices of dimension 3 only – Bananach Jul 19 '16 at 15:29

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.

# Special Cases

I can't answer your q directly, but there are special cases (of which I can only identify 1 atm) for which the computations can be simplified.

### Projection Matrices

$$det\left(A\right) = 0$$, if $$A = \vec{v}\left(\vec{v}\right)^T$$ bc...

• For this special case, the matrix is called a projection matrix; commonly denoted as $$P$$.
• Projection matrices are a subset of the symmetric matrices.
• Note property 1 of determinants: $$det\left(A\right) = det\left(ref\left(A\right)\right)$$.
• Note property 2 of determinants: $$det\left(A\right) = 0$$, if $$A$$ is a singular matrix.
• $$ref\left(P\right)$$ is singular by definition (i.e., dependent rows); Therefore, by p1 & p2, I conclude.

### Another Special Case

If you can think of more, please comment, & I will add them!