2

I have four matrices with below structures (mat1, mat2, mat3 and mat4). With real coefficients (c1, c2, c3) I have created the matrix matcomplete=(mat1+c1*mat2)+c3*(mat3+c2*mat4). All mat's are Hermitian matrices. I know in this case of real coefficients (as it is the my case), matcomplete will be Hermitian. Then the eigenvalues of matcomplete have to be real. But when I use of here method:

Eigenvalues[matcomplete, Cubics -> True]

the some eigenvalues will be Imaginary. I mean in one term I see

 (*  ((1 + I Sqrt[3])  *)

I wanted to use of FullSimplify[Eigenvalues[matcomplete, Cubics -> True], Assumptions{c1>0,c2>0,c3>0}] but it has taken too long!!.

There are some assumptions (but I think the third is true):

1-Eigenvalues of a Hermitian matrix such as matcomplete maybe are not always real.

2- matcomplete is not a Hermitian matrix even with real coefficients.

3-Eigenvalues[matcomplete, Cubics -> True] is not a good way for these matrices.

How can I reach to the correct eigenvalues of the matcomplete? here introduces a method that has been suggested by Feyre. It means that one way is use of numeric values but I have to obtain eigenvalues parametricaly.

    mat1={{0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0,0, 
 0, 1, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 
0, 0, 1, 0}, {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, {0, 
0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 1, 
0, 0, 1, 0, 0, 1, 0, 0, 0}, {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 
0, 0, 1}, {0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, {0, 1, 
0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0}, {1, 0, 0, 0, 0, 1, 0, 0, 
0, 0, 1, 0, 0, 0, 0, 1}, {0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,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 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 
   0}, {0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, -1, 0, 0, 0, 0, 0, 0,
   0, 0, -1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 
   0}, {0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, -1,
  0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 
  0, 0, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1,
   0}, {0, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 
  0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0, 0, 0,
   0, 0, -1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 
 0, 0}};
Unbelievable
  • 4,847
  • 1
  • 20
  • 46
  • I ran the FullSimplify[], and it still contains complex values, note that substituting in real positive values for the constants also still gives complex values. – Feyre Aug 16 '16 at 11:07
  • 1
    This is a cancellation error:
    `ret = Eigenvalues[newmat, Cubics -> True];
    Manipulate[
      Chop[N[ret] /. {c1 -> a1, c2 -> a2, c3 -> a3}], {a1, 0, 10, 
       0.1}, {a2, 0, 10, 0.1}, {a3, 0, 10, 0.1}] // MatrixForm`
    
    – Feyre Aug 16 '16 at 11:16
  • @ Feyre, I think I cannot understand a thing! You added Chop and look numerically to eigenvalues. But no eigenvalues are complex. – Unbelievable Aug 16 '16 at 12:57
  • Could you tell the coefficients for which you get complex eigenvalues? – Sumit Aug 16 '16 at 13:34
  • @ Sumit, So Sorry, I could not understand your sentence. I think a verb is missed. – Unbelievable Aug 16 '16 at 13:43
  • @Irreversible The Chop[] is to illustrate that the Imaginary components of the eigenvalues are close to zero, and the result of cancellation errors. – Feyre Aug 16 '16 at 13:51
  • @ Feyre, Yes. You are right. In another question I try to focus on Root of any eigenvalues equations. – Unbelievable Aug 16 '16 at 14:00
  • 2
    Again we have the casus irreducibilis situation for radical solutions of the cubic. I'd suggest use Root form, it's better anyway. – Daniel Lichtblau Aug 16 '16 at 14:34
  • @Irreversible, let me refresh my grammar. You construct matcomplete from 4 Hermitian matrix, and if I understand correctly, you find some complex eigenvalues which lead you to your three assumptions. Can you give an example when matcomplete returns complex eigenvalues. If it is happening for some values of c1,c2,c3 , what are those values? – Sumit Aug 16 '16 at 15:16
  • @ Sumit, when we use of numerical coefficients (please set each of them equal to 5) or in a way suggested by Feyre, imaginary parts will be so little which can be eliminated by Chop. But if you attack to the problem parametricaly (not numerics) you can see that appeared (1-Sqrt[3] I) term and so on. and I need to parametric configuration of eigenvalues unfortunately! – Unbelievable Aug 16 '16 at 15:43
  • As @DanielLichtblau mentioned, you can't always get what you want, see Casus irreducibilis. So I think the question will not be answerable in the way you expect. But all the eigenvalues will be real, you can be certain of that even if imaginary units appear. – Jens Aug 16 '16 at 16:26
  • 2
  • @ Jens, thank you to suggest the address. but I explained and modified the body of question that the address is not useful for me. If possible please don't sign the question as duplicate. – Unbelievable Aug 16 '16 at 16:53
  • @ Jens, right now I saw your comment. Ok I am convinced that I cannot obtain all I want but I just want the real part. I want to eliminate not necessary imaginary part. for example it will be so good if the answers be as (a+b I). I just choose a and I know b is not important. but answers are not written as a+b I?!!!! I have written another question which strongly related to this question. – Unbelievable Aug 16 '16 at 17:02

1 Answers1

1

You can simply ignore the fact that you are seeing a (1 + I Sqrt[3]). Let's have a look at the last eigenvalue where this thing appears.

eval = Eigenvalues[matcomplete, Cubics -> True][[-1]]

(-2*(-c3 + c2*c3))/3 - ((1 - ISqrt[3])(-48 - 48*c1^2 - 16*c3^2 - 16*c2*c3^2 - 16*c2^2*c3^2))/ (3*2^(2/3)*(-1152*c3 + 576*c1^2*c3 - 576*c2*c3 + 1152*c1^2*c2*c3 + 128*c3^3 + 192*c2*c3^3 - 192*c2^2*c3^3 - 128*c2^3*c3^3 + Sqrt[4*(-48 - 48*c1^2 - 16*c3^2 - 16*c2*c3^2 - 16*c2^2*c3^2)^3 + (-1152*c3 + 576*c1^2*c3 - 576*c2*c3 + 1152*c1^2*c2*c3 + 128*c3^3 + 192*c2*c3^3 - 192*c2^2*c3^3 - 128*c2^3*c3^3)^2])^(1/3)) + ((1 + ISqrt[3])(-1152*c3 + 576*c1^2*c3 - 576*c2*c3 + 1152*c1^2*c2*c3 + 128*c3^3 + 192*c2*c3^3 - 192*c2^2*c3^3 - 128*c2^3*c3^3 + Sqrt[4*(-48 - 48*c1^2 - 16*c3^2 - 16*c2*c3^2 - 16*c2^2*c3^2)^3 + (-1152*c3 + 576*c1^2*c3 - 576*c2*c3 + 1152*c1^2*c2*c3 + 128*c3^3 + 192*c2*c3^3 - 192*c2^2*c3^3 - 128*c2^3*c3^3)^2])^(1/3))/ (6*2^(1/3))

enter image description here

and you can see $1-i\sqrt3$ and also $1+i\sqrt3$. Now Mathematica can not simplify it because it does not know the values of c1,c2,c3 so it can not evaluate the square roots and cube roots. Specifying c1,c2,c3 to be Reals or $>0$ is not sufficient because it does not specify the value of the terms inside the roots. But when you specify the exact values, it can evaluate those terms and the imaginary parts cancels each other explicitly and you get real eigenvalues. May be with some luck and trials you can find a condition which can get read of the imaginary part in this parametric form - I am too lazy for that.

Feyre
  • 8,597
  • 2
  • 27
  • 46
Sumit
  • 15,912
  • 2
  • 31
  • 73