# How to find the eigenvalues of the abstract matrix satisfying the condition

It is known that $$E$$ is a third-order identity matrix and $$A$$ is a third-order real symmetric matrix. Matrix $$A$$ satisfies the condition of $$A^{2}+A=2 E$$.

How to find the eigenvalue of this abstract matrix (reference answer: -2,-2,1).

• This seems to be more a question about mathematics than about Mathematica. – Michael Seifert Jul 29 at 15:25
• @MichaelSeifert On one hand yes, but it can be easily understood as "how to do it entirely in Mathematica as a demonstration", which is how it turned out in Nasser's answer. – corey979 Jul 29 at 17:48

How to find the eigenvalue of this abstract matrix (reference answer: -2,-2,1).

I am assuming $$A^2$$ means $$A*A$$? If so, then may be

e = IdentityMatrix[3];
a = {{a11, a21, a31}, {a21, a22, a32}, {a31, a32, a33}}(*abstract symmetric matrix*)
eqs = Thread[Flatten[a.a + a] == Flatten[2*e]];
sol = FindInstance[eqs, Flatten[a]];
Eigenvalues[a /. sol]


This suggests minimal polynomial of $$A$$ is $$x^2+x-2$$. This has roots -2,1 (the eigenvalues not counting multiplicities). Note $$m(A)$$ divides $$p(A)$$ (the characteristic polynomial, which by Cayley-Hamilton $$p(A)=0$$)

(-2,-2,1) or (-2,1,1) could be eigenvalues of $$A$$: e.g. using diagonal matrices. This also case when examine other instances from @Nasser code.

For illustrative purposes:

Solve[x^2 + x - 2 == 0, x]
a1 = {{-2, 0, 0}, {0, -2, 0}, {0, 0, 1}};
a2 = {{-2, 0, 0}, {0, 1, 0}, {0, 0, 1}};
Eigenvalues[a1]
Eigenvalues[a2]
a1.a1 + a1 // MatrixForm
a2.a2 + a2 // MatrixForm
MatrixMinimalPolynomial[a_List?MatrixQ, x_] :=
Module[{i, n = 1, qu = {},
mnm = {Flatten[IdentityMatrix[Length[a]]]}},
While[Length[qu] == 0, AppendTo[mnm, Flatten[MatrixPower[a, n]]];
qu = NullSpace[Transpose[mnm]];
n++];
First[qu].Table[x^i, {i, 0, n - 1}]]
MatrixMinimalPolynomial[a1, x]
MatrixMinimalPolynomial[a2, x]


Illustrating from @Nasser code:

e = IdentityMatrix[3];
a = {{a11, a21, a31}, {a21, a22, a32}, {a31, a32,
a33}};(*abstract symmetric matrix*)
eqs = Thread[Flatten[a.a + a] == Flatten[2*e]];
sol = FindInstance[eqs, Flatten[a], 10];
Table[Eigenvalues[a /. sol[[j]]], {j, 10}]


See also comment @Szabolcs: $$I^2+ I =2 I$$ for any $$n$$ as well as $$(-2I)^2+(-2 I)=2I$$

• $(1,1,1)$ is also possible if $A$ is the identity matrix. The result is a bit ugly, but Solve instead of FindInstance does succeed with Nasser's code. – Szabolcs Jul 29 at 8:38
• @Szabolcs thank you. Of course you are correct. – ubpdqn Jul 29 at 8:40