# Determine, whether the matrix is diagonalizable or not

Suppose, we have the following matrix $$A=\begin{pmatrix} 1 & 1 & 4\\ 2 & 2 & 1\\ 2 & 4 & 4\end{pmatrix}$$ over the field $$\mathbb{Z}_5$$.

To show, that $$A$$ is diagonalizable, we need to show, that the dimension of the sum of all eigenspaces equals the dimension of the matrix.

Therefore, we will calculate the eigenvalues, eigenvectors and get the eigenspaces. We need to calculate the characteristic polynomial with

$$\chi_A(\lambda)=\begin{vmatrix} 1-\lambda & 1 & 4\\ 2 & 2-\lambda & 1\\ 2 & 4 & 4-\lambda \end{vmatrix}=4\lambda^3+2\lambda^2+4,\quad \lambda\in\mathbb{Z}_5$$

In order to compute the eigenvalues, I will need to find the roots of $$4\lambda^3+2\lambda^2+4$$.

\begin{align} 4\lambda^3+2\lambda^2+4&=0 && \mid &+1\\ 4\lambda^3+2\lambda^2&=1 && \mid &\\ \lambda^2(4\lambda+2)&=1 \end{align} We have $$\lambda_1=1,\lambda_2=4,\lambda_3=1$$

Now, we insert them into $$\chi_a(\lambda)$$

$$\lambda = 1$$:

$$\begin{pmatrix} 0 & 1 & 4\\ 2 & 1 & 1\\ 2 & 4 & 3 \end{pmatrix} \iff\dots \iff \begin{pmatrix} 2 & 1 & 1\\ 0 & 1 & 4\\ 0 & 0 & 0 \end{pmatrix}$$ $$L:=\{t\cdot(4,1,1)\mid t\in \mathbb{Z}_5\}$$
One of the (infinity) eigenvectors of $$\lambda = 1$$ is $$v=(4,1,1)$$ and the eigenspace is $$E_A(\lambda = 1):=\{t\cdot(4,1,1)\mid t\in \mathbb{Z}_5\}$$

For $$\lambda = 4$$, I will get an eigenvector of $$u=(0,0,0)$$ which wouldn't work with $$u\neq 0$$ in the definition of eigenvalues/-vectors. Does that mean, the matrix is not diagonalizable?

• It means that $\lambda=4$ is not an eigenvalue. How did you get from $\lambda^2(4\lambda+2)=1$ to $\lambda=1,4$? I suspect you need to review how to solve quadratic equations. – David C. Ullrich Jul 12 '19 at 17:20

The characteristic polynomial of that matrix is

$$x^3-7x^2-14=x^3+3x^2+1=(x-1)(x+2)^2\pmod 5=(x-1)(x-3)^2\pmod5$$

so we only need the dimension of the eigenvalue $$\;x=-2=3\pmod5\;$$:

$$\begin{cases}3x+y+4z=0\\{}\\ 2x+4y+z=0\\{}\\ 2x+4y+z=0\end{cases}\implies x+2y+3z=0$$

and since this last equation is a plane (in $$\;\left(\Bbb Z_5\right)^2)\;$$ , the matrix is diagonalizable.

• I thought it's $-\lambda^3+7\lambda^2+14\equiv \lambda^3+2\lambda^2+4 \quad \mod 5$ isn't it? – Doesbaddel Jul 13 '19 at 9:22
• @Doesbaddel No, it is not since $\;-1\neq1\pmod5\;$...and also $\;7\neq-2\pmod 5\,,\,\,14\neq-4\pmod5\;$ . What you probably meant is $$\color{red}0=-x^3+7x^2+14\stackrel{\cdot(-1)}\iff0= x^3-7x^2-14=\color{red}{x^3+3x^2+1}$$ – DonAntonio Jul 13 '19 at 9:35
• Oh, I always thought I can compute things like that in $\mathbb{R}$ and then exchange that into $\mathbb{Z}_5$ – Doesbaddel Jul 13 '19 at 10:09
• @Doesbaddel Well, you can do those things in $\;\Bbb Z\;$ and then translate them to $\;\Bbb Z_n\;$ ....that you can do. – DonAntonio Jul 13 '19 at 10:12
• No, that is correct !! Observe that the coefficients of corresponding powers of $\;x\;$ are exactly the same $\;\pmod 5\;$ . But if you want the equation $\;p(x)=0\;$ to be monic (i.e., with leading coefficient equla to one), then **in the equation you must multiply all by $\;-1\;$ as I showed you above several times. Either way, the roots of the polynomial are the very same since the equations $\;p(x)=0\,,\,\,-p(x)=0\;$ have the very same roots! – DonAntonio Jul 13 '19 at 10:43

Note that computer algebra systems like sage solve such computational exercises in a way, that may accelerate the learning curve. There is no "structural business" in computing (and humanly checking the own sparse computation on a sheet of paper) the characteristic polynomial of a matrix, and its roots, so letting a computer do the job may be a good strategy to get the focus on structure and ideas.

If code is not what you want, please ignore the following answer.

Sage code, typed interactively:

sage: A = matrix( GF(5), 3, 3, [1,1,4, 2,2,1, 2,4,4] )
sage: A
[1 1 4]
[2 2 1]
[2 4 4]

sage: A.charpoly()
x^3 + 3*x^2 + 1
sage: A.charpoly().factor()
(x + 4) * (x + 2)^2

sage: D, T = A.jordan_form(transformation=True)

sage: D
[1|0|0]
[-+-+-]
[0|3|0]
[-+-+-]
[0|0|3]

sage: T
[1 1 0]
[4 0 1]
[4 3 1]

sage: T * D * T.inverse()
[1 1 4]
[2 2 1]
[2 4 4]

sage: T * D * T.inverse() == A
True

sage: A.eigenvectors_right()
[(1, [
(1, 4, 4)
], 1), (3, [
(1, 0, 3),
(0, 1, 1)
], 2)]


Then from the A.eigenvectors_right() result, for the eigenvalue 1 we have the eigenvector (1, 4, 4) corresponding to the first column in the computed base change matrix T. For the eigenvalue 3 with multiplicity two there are also two (linearly independent) eigenvectors

  (1, 0, 3),
(0, 1, 1)


(the other two columns of T,) and having them we also knowthe given matrix $$A$$ is diagonalizable.

• Unless explicitly required or allowed, computerwise answers are strictly rejected in almost any mathematics course. – DonAntonio Jul 13 '19 at 9:39
• @DonAntonio you're right, we are not allowed to use calculators and similar computation hard- and software. – Doesbaddel Jul 13 '19 at 10:41
• @Doesbaddel That's how things are usually done in mathematics or physics...in computation or engineering they can usually use calculators and stuff. – DonAntonio Jul 13 '19 at 10:45
• @DonAntonio Yeah, that is mostly the case. – Doesbaddel Jul 13 '19 at 10:47
• @DonAntonio: There is a specific line above, "If code is not what you want, please ignore..." We are here not in some mathematics course. Instead, we have a clear simple exercise, where simple operations went wrong. I could have typed all the above with own fingers, but the information needed in the OP is in a human readable shape there. Namely: The characteristic polynomial is wrong in the OP, the correct version is here, the factorization is here, the base change matrix is here, and the interpretation of the columns as eigenvectors is also here. Having the data, one can check the data. – dan_fulea Jul 16 '19 at 15:40