In the following
HH = H /. {μ -> 1, Δ -> .3, L -> 11, ky -> 0};
Plot[Re[Sort[Eigenvalues[HH]]], {kx, -2 π/11, 2 π/11}, PlotPoints -> 10]
where H is a matrix expression that depends on kx, ky, μ, L, Δ.
Is there a faster way to plot the numerical eigenvalues of this matrix as a function of kx, for example? Any help would be really appreciated.
Update
I'd like to state, I want to do this purely numerical. My issue is that I want to solve the eigenvalue problem for MANY values of kx. H can be large in this case, sometimes 400 by 400. I only used 10 PlotPoints just as an example.
I found that Table is very quick and I can do a ListLinePlot. I just naively thought this same operation would be done in Plot. This is where my confusion still lies if someone wants to help :)
Second Update
Here is H as requested.
NN = 40;
MM = 2 NN + 1;
kM = Table[
Boole[m == n] (ky + I (kx + m 2 \[Pi]/L)),
{m, -NN, NN, 1}, {n, -NN, NN, 1}];
kM2 = Table[
Boole[m == n] (ky - I (kx + m 2 \[Pi]/L)),
{m, -NN, NN, 1}, {n, -NN, NN, 1}];
\[Mu]M = IdentityMatrix[MM] \[Mu];
\[CapitalDelta]M = (\[CapitalDelta] I/2 )
* Table[ (KroneckerDelta[m, n - 1] - KroneckerDelta[m, n + 1]),
{m, -NN, NN, 1}, {n, -NN, NN, 1}];
H = ArrayFlatten[{
{-\[Mu]M, kM,0 \[Mu]M, \[CapitalDelta]M},
{kM2, -\[Mu]M, -\[CapitalDelta]M, 0 \[Mu]M},
{0 \[Mu]M, -\[CapitalDelta]M, \[Mu]M, kM2},
{\[CapitalDelta]M, 0 \[Mu]M, kM, \[Mu]M}
}];
Third update
This is initially represented as
$h= \vec{\sigma} \cdot \vec{k}-\mu$
$h_\tau= \vec{\sigma^{\ast}} \cdot \vec{k}+\mu$
$H=\left(\begin{array}{cc} h & i \Delta \sigma_y\\ -i \Delta\sigma_y & h_\tau \end{array}\right)$
where $\sigma$ are the Pauli matrices. The individual values change do to some implications from a physical system. I didn't want to get too deep into the physics, as there is another stack for that.
The block elements don't commute because the Pauli matrices don't commute, but if you see any symmetries that I don't see please do enlighten me. So far I've always done this numerically.
kM == ConjugateTranspose[kM2], so you can simplify your code by eliminatingkM2, and replace it withkM\[ConjugateTranspose]. And, as I pointed out before, you can replace the0 \[Mu]Mterms with0, and it will be interpreted correctly. Any other symmetries that your aware of? If so, you can block-diagonalize it based upon those. – rcollyer Mar 15 '12 at 16:32