Thing you want to do:
--Creating a Hermite matrix of linear algebra and cking it in Python --Cck in Python that the eigenvalue is real
The matrix $ A $ is transposed, and the complex conjugate of each component is called the conjugate transpose, which is represented by $ A ^ {\ dagger} $. What is Hermite at this time?
A^{\dagger}=A
Is established
A=\left(
\begin{matrix}
1 & 2+\sqrt{-1} \\
2-\sqrt{-1} & 4
\end{matrix}
\right), B:=A^{\dagger}
(That is, let's put $ B $ as a conjugate matrix of $ A $):
> import numpy as np
> A = np.array([[1,2+1j],[2-1j,4]])
> B = np.conjugate(A.T) #Transpose, complex conjugate!
> A
array([[ 1.+0.j, 2.+1.j],
[ 2.-1.j, 4.+0.j]])
> B
array([[ 1.-0.j, 2.+1.j],
[ 2.-1.j, 4.-0.j]])
Since $ B = A ^ {\ dagger} $, I wish I could say $ A = B $.
> A-B
array([[ 0.+0.j, 0.+0.j],
[ 0.+0.j, 0.+0.j]]) #OK!Well, it's a duck that you can see if you look at it, but ...
The eigenvalues of the Hermite matrix $ A $ are real, but it's a check. The eigen equation is
\begin{eqnarray}
\det(\lambda I_2-A) &=& (\lambda-1)(\lambda-4)-(2+\sqrt{-1})(2-\sqrt{-1})\\
&=& \lambda^2-5\lambda+4-5 \\
&=& \lambda^2-5\lambda-1
\end{eqnarray}
So, in theory, this is the case:
\lambda = \frac{5\pm\sqrt{25-4\times(-1)}}{2}=\frac{5\pm\sqrt{29}}{2}
It's a real number! In terms of implementation
> eigen_value, eigen_vector = np.linalg.eig(A)
> eigen_value
array([-0.1925824 -3.07382855e-18j, 5.1925824 -2.18970776e-16j])
> (5-np.sqrt(29))/2
-0.19258240356725187
> (5+np.sqrt(29))/2
5.1925824035672523
So, the imaginary part has popped out, but as usual, it's a numerical one.
Recommended Posts