# Calculate the determinant of $A-5I$

Question

Let $A = \begin{bmatrix} 1 & 2 & 3 & 4 & 5 \\ 6 & 7 & 8 & 9 & 10 \\ 11 & 12 & 13 & 14 & 15 \\ 16 & 17 & 18 & 19 & 20 \\ 21& 22 & 23 & 24 & 25 \end{bmatrix}$.

Calculate the determinant of $A-5I$.

My approach

the nullity of $A$ is $3$, so the algebraic multiplicity of $\lambda = 0$ is $3$, i.e. $\lambda_1 = \lambda_2 = \lambda_3 = 0.$

Now trace($A$) = $\lambda_4 + \lambda_5 = 1+6+13+19+25 = 65$

Then det($A-5I$) = $(\lambda_1-5)(\lambda_2-5)(\lambda_3-5)(\lambda_4-5)(\lambda_5-5)=(-5)^3(\lambda_4\lambda_5 - 5 \times 65 + 25)$

We need to calculate the value of $\lambda_4 \lambda_5$, which includes sum of lots of determinant of $2 \times 2$ matrices.

Is there any fast way to calculate the determinant?

To determine $$\det(A - 5I)$$, it suffices to compute the eigenvalues of $$A$$. To that end, we note that $$A$$ has rank $$2$$, which means that it has at most $$2$$ non-zero eigenvalues.

Let $$\lambda_1,\lambda_2$$ denote these eigenvalues. We note that $$\lambda_1 + \lambda_2 = \operatorname{tr}(A) = 65\\ \lambda_1^2 + \lambda_2^2 = \operatorname{tr}(A^2) = 4725$$ Solving these equations for $$\lambda_{1},\lambda_2$$ yields $$\lambda_{1,2} = \frac 12\left(65 \pm 5 \sqrt{209}\right)$$ We thereby compute $$\det(A - 5I) = \prod_{k=1}^5 (\lambda_k - 5) = \frac 14(55^2 - 25 \cdot 209) \cdot (-5)^3 = 68750$$

Another strategy to calculate this determinant:

Note that $$A$$ has a rank factorization $$A = UV$$, where $$U = \pmatrix{0&1\\5&1\\10&1\\15&1\\20&1}, \quad V = \pmatrix{1 & 1 & 1 & 1 & 1\\ 1 & 2 & 3 & 4 & 5}.$$ The Sylvester determinant identity then yields $$\det(UV - 5 I) = 5^{3} \det(VU - 5 I) = (-5)^3 \det \pmatrix{45 & 5\\200 & 10} = 68750.$$

If you want to find the eigenvalues:

Note that whenever matrices $$U,V$$ are such that $$UV$$ and $$VU$$ are well defined products, $$UV$$ and $$VU$$ will have the same non-zero eigenvalues. Thus, the non-zero eigenvalues of $$A = UV$$ are equal to the non-zero eigenvalues of $$B = VU = \pmatrix{1 & 1 & 1 & 1 & 1\\ 1 & 2 & 3 & 4 & 5} \pmatrix{0&1\\5&1\\10&1\\15&1\\20&1} = \pmatrix{50 & 5\\200 & 15}.$$ The eigenvalues of this matrix (both of which are non-zero) are equal to the solutions of the characteristic equation $$\lambda^2 - \operatorname{tr}(B) \lambda + \det(B) = 0 \implies\\ \lambda^2 - 65 \lambda - 250 = 0 \implies \\ \lambda = \frac 12\left(65 \pm 5 \sqrt{209}\right).$$

• Computing tr($A^2$) may take lots of time, is there any faster way to calculate this? Dec 30, 2017 at 18:55
• Yes but less multiplications (125) overall than if you compute the determinant (around 500) Dec 30, 2017 at 19:33
• Maybe with $\operatorname{Tr}(A^TA)$, you could do something involving singular values Dec 31, 2017 at 10:53

Row-reducing the matrix $A-5I$ is quicker. $$\begin{gather} \begin{pmatrix} -4 & 2 & 3 & 4 & 5 \\ 6 & 2 & 8 & 9 & 10 \\ 11 & 12 & 8 & 14 & 15 \\ 16 & 17 & 18 & 14 & 20 \\ 21 & 22 & 23 & 24 & 20 \end{pmatrix} \longrightarrow \begin{pmatrix} -4 & 2 & 3 & 4 & 5 \\ 14 & -2 & 2 & 1 & 0 \\ 23 & 6 & -1 & 2 & 0 \\ 32 & 9 & 6 & -2 & 0 \\ 37 & 14 & 11 & 8 & 0 \end{pmatrix} \\ \longrightarrow \begin{pmatrix} -4 & 2 & 3 & 4 & 5 \\ 14 & -2 & 2 & 1 & 0 \\ -5 & 10 & -5 & 0 & 0 \\ 60 & 5 & 10 & 0 & 0 \\ -75 & 30 & -5 & 0 & 0 \end{pmatrix} \longrightarrow \begin{pmatrix} -4 & 2 & 3 & 4 & 5 \\ 14 & -2 & 2 & 1 & 0 \\ -5 & 10 & -5 & 0 & 0 \\ 50 & 25 & 0 & 0 & 0 \\ -70 & 20 & 0 & 0 & 0 \end{pmatrix} \\ \longrightarrow \begin{pmatrix} -4 & 2 & 3 & 4 & 5 \\ 14 & -2 & 2 & 1 & 0 \\ -5 & 10 & -5 & 0 & 0 \\ 50 & 25 & 0 & 0 & 0 \\ -110 & 0 & 0 & 0 & 0 \end{pmatrix} \end{gather}$$ This takes not more than $30$ multiplications in all. The determinant is clearly $$5\cdot (-1) \cdot (-5) \cdot (-25) \cdot (-110) = 68750.$$ I chose to row-reduce the matrix in this fashion to make use of the fact that every entry in the last column is a multiple of $5$. It made the calculations easier when doing it by hand.

• This row reduction from right to left is clever. +1 Dec 31, 2017 at 6:24

The calculation of $\lambda_4 \lambda_5$ (which in this case is equivalent to the cubic term of the characteristic polynomial) is indeed given by the sum of principal $2\times2$ subdeterminants

$$\lambda_4 \lambda_5 = \sum_{i=2}^5 \sum_{j=1}^{i-1} \left|\begin{matrix}a_{ii}&a_{ij}\\a_{ji}&a_{jj}\end{matrix}\right|.$$

In this case we actually have the easy formula $a_{ij} = 5i+j-5$, so the above subdeterminant simplifies to $-5(i-j)^2$. We can of course evaluate the double sum algebraically, but it's just as easy to regroup the sum according to the value of $i-j$:

$$\sum_{1\le j < i \le 5} (i-j)^2 = 4\cdot 1^2 + 3\cdot 2^2 + 2\cdot 3^2 + 1\cdot4^2 = 4 + 12 + 18 + 16 = 50.$$

Thus $\lambda_4 \lambda_5 = -5(50) = -250$ and $\det(A-5I) = (-5)^3 (-250-5\cdot 65+25) = 68750$.

Let the standard basis of $\mathbb R^5$ be denoted $\{e_1,e_2,\dotsc,e_5\}$. Let $\vec l$ denote the leftmost column of $A$, and let $\vec 1$ be the column vector of all $1$s. We have that for all $i \in \{1,\dotsc,5\}$: \begin{align}&Ae_i = \vec l+(i-1)\vec1 \\&\vec l = \sum_{i=1}^5 ie_i \\&\vec 1 = \sum_{i=1}^5 e_i\end{align} Since every vector in the image (or range, if you call it that) of $A$ is a linear combination of $\vec 1$ and $\vec l$, it follows that the rank of $A$ is $2$. From which it follows that $3$ of $A$'s eigenvalues are $0$.

We now proceed to find the remaining eigenvalues. We focus on the subspace of $\mathbb R^5$ spanned by $\vec 1$ and $\vec l$. We see that $$A \vec 1 = 10\vec 1 + 5\vec l \\ A \vec l= 160\vec 1 + 55\vec l$$ Restrict $A$ to the subspace $\operatorname{span}\{\vec 1, \vec l\}$, and change to the basis $\{\vec 1, \vec l \}$. You get:$$B=\begin{bmatrix}10 & 160 \\ 5 & 55 \end{bmatrix}$$ Any eigenvalue of $B$ is an eigenvalue of $A$. The eigenvalues of $B$ are $λ_{12} = \frac52 (13 \pm \sqrt{209})$.

We've now found all of $A$'s eigenvalues.

Finally, the determinant of $A$ is $\prod_{i=1}^5(\lambda_i - 5) = \frac52(11 + \sqrt{209})\frac52(11 - \sqrt{209})(-5)(-5)(-5)=68750$.