# How to find the determinant of this matrix

I have the following matrix:

$\begin{bmatrix} a & 1 & 1 & 1 \\ 1 & a & 1 & 1 \\ 1 & 1 & a & 1 \\ 1 & 1 & 1 & a \\ \end{bmatrix}$

My approach is to rref the matrix so that i can find the determinant by multiplying along the diagonals.

I attempted to do an rref and ended up with $\begin{bmatrix} 1 & a & 1 & 1 \\ 1-a & a-1 & 0 & 0 \\ 0 & 1-a & a-1 & 1 \\ 0 & 0 & 1-a & a-1 \\ \end{bmatrix}$

I then factored out (1-a) to get this $\begin{bmatrix} 1 & a & 1 & 1 \\ 1 & -1 & 0 & 0 \\ 0 & 1 & -1 & 1 \\ 0 & 0 & 1 & -1 \\ \end{bmatrix}$ which will then make my determinant a multipile of $(1-a)^3$: $\det(A) = (1-a)^3x$

But now here I don't know what to do. I have a feeling that my approach is wrong. Any help or guide please?

To find the determinant you could just do it brute force by "Expansion by Minors" using the first row: \begin{align} \det \begin{bmatrix} a & 1 & 1 & 1 \\ 1 & a & 1 & 1 \\ 1 & 1 & a & 1 \\ 1 & 1 & 1 & a \\ \end{bmatrix} = a\det \begin{bmatrix} a & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a \\ \end{bmatrix} \\- 1\det\begin{bmatrix} 1 & 1 & 1 \\ 1 & a & 1 \\ 1 & 1 & a \\ \end{bmatrix} \\+ 1\det \begin{bmatrix} 1 & a & 1 \\ 1 & 1 & 1 \\ 1 & 1 & a \\ \end{bmatrix} \\- 1\det\begin{bmatrix} 1 & a & 1 \\ 1 & 1 & a \\ 1 & 1 & 1 \\ \end{bmatrix} \end{align}

How about the LU decomposition (modulo a rearrangements of rows)?

\begin{align*} &\left[\begin{array}{cccc}0&1&0&0\\0&0&0&1\\0&0&1&0\\1&0&0&0\end{array}\right]\times\left[\begin{array}{cccc} a&1&1&1\\ 1&a&1&1\\ 1&1&a&1\\ 1&1&1&a\end{array}\right]\\=&\left[\begin{array}{cccc}1&0&0&0\\1&1&0&0\\1&1&1&0\\a&1+a&-1&1\end{array}\right]\times\left[\begin{array}{cccc}1&a&1&1\\0&1-a&0&a-1\\0&0&a-1&1-a\\0&0&0&(3+a)(1-a)\end{array}\right]. \end{align*} It follows that the determinant is $(a-1)^3(3+a)$.

• I would always propose the LDU-decomposition; in my view the results are often more intuitive; for instance in the symmetric case the L and U are identical (besides transposition) and for the determinant (and related questions) we look at the diagonalmatrix D only. – Gottfried Helms Oct 14 '13 at 21:59

The LDU-decomposition gives $$L=\small \begin{bmatrix} 1 & . & . & . \\ 1/a & 1 & . & . \\ 1/a & 1/(a+1) & 1 & . \\ 1/a & 1/(a+1) & 1/(a+2) & 1 \\ \end{bmatrix} \\ D= \small \begin{bmatrix} a & . & . & . \\ . & (a^2-1)/a & . & . \\ . & . & (a^2+a-2)/(a+1) & . \\ . & . & . & (a^2+2a-3)/(a+2) \\ \end{bmatrix} \\ U=\small \begin{bmatrix} 1 & 1/a & 1/a & 1/a \\ . & 1 & 1/(a+1) & 1/(a+1) \\ . & . & 1 & 1/(a+2) \\ . & . & . & 1 \end{bmatrix}$$ Here L and U are simply transposed (which reflects the symmetry of the original matrix), and all of the determinant-compuation happens in the diagonal of D.

The determinant is $$a {a^2-1\over a} {a^2+a-2\over a+1}{a^2+2a-3\over a+2}$$ Expanding gives $$a\cdot {(a-1)(a+1)\over a} \cdot {(a-1)(a+2)\over a+ 1}\cdot {(a-1)(a+3)\over a+2}$$ and cancelling over the diagonal gives $$1{a-1\over 1}\cdot {a-1\over 1}\cdot {(a-1)(a+3)\over 1}$$ which is the same as that in the answer of triplesec above

This representation has also the advantage that it is easily extensible to larger matrices

• Nice! All the more so because my first answer pertained only to a permutation of the original matrix, which takes away much of its elegance. Your solution is way more elegant. However, it fails to address the nasty cases $a\in\{0,-1,-2\}$, in which case your formulae involve division by zero. My solution seems to be more robust in this sense. – triple_sec Oct 14 '13 at 22:36
• @triple_sec: yes; your point of "robustness" is a good point. It is similar to the question of robustness of the q-polynomials $[n]_q={q^n-1 \over q-1}$ for the case of $q \to 1$. However there, using the limit we get the nice result, that for $q=1$ we have simply $[n]_q=[n]_1=n$ and in operator-matrices for iteration of functions we have this nasty $a-1$,$a^2-1$,$a^3-1$ nearly everywhere in the denominators... – Gottfried Helms Oct 14 '13 at 22:41
• Beautiful, easily generalised - I like it! – Bennett Gardiner Oct 15 '13 at 1:12

I think Thomas's solution is more practical but here is an alternative just for fun. This matrix looks highly degenerate and the eigenvalue problem can be solved here just by looking at it.

Look at what happens when we subtract a pair of columns,

$$\left( \begin{array}{c} a \\ 1 \\ 1 \\ 1 \end{array} \right) -\left( \begin{array}{c} 1 \\ 1 \\ 1 \\ a \end{array} \right) = \left( \begin{array}{c} (a-1)\\ 0 \\ 0 \\ (1-a) \end{array} \right) = (a-1)\left(\begin{array}{c} 1\\ 0 \\ 0 \\ -1 \end{array} \right)$$

This means that $(1,0,0,-1)$ is an eigenvector of the matrix with eigenvalue (a-1). A total of three independent eigenvectors with the same eigenvalue can be obtained in this manner by subtracting the other columns from the first column. If you don't see how subtracting the first and last column is the same as multiplying the matrix by $(1,0,0,-1)$ then I recommend two things: first multiply the matrix by each of the standard basis vectors and look at what you get, then multiply the matrix by $(1,0,0,-1)$ and see how that relates to the first thing.

The fourth eigenvector can be found by noticing that the sums of the components of the rows are all the same value $(3+a)$. This means that $(1,1,1,1)$ is an eigenvector with that eigenvalue.

This can be finished off by recognizing that the determinant is the product of the eigenvalues.

at lin3 col 4 is 0 not 1
det$\begin{bmatrix} 1 & a & 1 & 1 \\ 1 & -1 & 0 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 1 & -1 \\ \end{bmatrix}$ ~det$\begin{bmatrix} a+3 & a & 1 & 1 \\ 0 & -1 & 0 & 0 \\ 0 & 1 & -1 & 0 \\ 0 & 0 & 1 & -1 \\ \end{bmatrix}$ etc.