I am trying to calculate eigenvalues of a sparse matrix with only two distinct non-zero elements, here Alpha and Beta, which are both negative reals. Mathematica returns some complex expressions with Root[]
values when using the Eigenvalues[]
command on the following matrixA:
In all cases the matrices are symmetric and real and hence have real eigenvalues.
matrixA={
{α, β, 0, 0, 0, 0, β, 0, 0, β},
{β, α, β, 0, 0, 0, 0, 0, 0, 0},
{0, β, α, β, 0, 0, 0, 0, 0, 0},
{0, 0, β, α, β, 0, 0, 0, 0, 0},
{0, 0, 0, β, α, β, 0, 0, 0, 0},
{0, 0, 0, 0, β, α, β, 0, 0, 0},
{β, 0, 0, 0, 0, β, α, β, 0, 0},
{0, 0, 0, 0, 0, 0, β, α, β, 0},
{0, 0, 0, 0, 0, 0, 0, β, α, β},
{β, 0, 0, 0, 0, 0, 0, 0, β, α}
}
For comparison, with all the other similar matrices I've tried (see below e.g. matrixB) Mathematica will put out simple decimal approximations (using Eigenvalues[matrixB] // N // Simplify
)
Can anyone point out a way to get expressions for the matrixA
as simple as for matrixB
?
And yes, the desired simple answers for matrixA
do exist, I can get them with other programs, but I want to use Mathematica!
I should add that I already have already used $Assumptions = α<0 && β <0
at the top of my worksheet.
matrixB={
{α, β, 0, 0, 0, 0, 0, 0, 0, β},
{β, α, β, 0, 0, 0, 0, 0, 0, 0},
{0, β, α, β, 0, 0, 0, β, 0, 0},
{0, 0, β, α, β, 0, 0, 0, 0, 0},
{0, 0, 0, β, α, β, 0, 0, 0, 0},
{0, 0, 0, 0, β, α, β, 0, 0, 0},
{0, 0, 0, 0, 0, β, α, β, 0, 0},
{0, 0, β, 0, 0, 0, β, α, β, 0},
{0, 0, 0, 0, 0, 0, 0, β, α, β},
{β, 0, 0, 0, 0, 0, 0, 0, β, α}
}
Answer
Well, I figured out how the other programs do get numeric answers. Of course the trick is to eliminate the symbols. Since matrixA
is so simply structured it can be massaged into a non-symbolic form, calculate numerically the eigenvalues of that, and then unmassage them to recover the symbolic eigenvalues. Divide the whole matrix by β
then "re-zero" the main diagonal to α/β
.
For reference,
reducedmatrixA=({
{0, 1, 0, 0, 0, 0, 1, 0, 0, 1},
{1, 0, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0},
{1, 0, 0, 0, 0, 1, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 1, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 1},
{1, 0, 0, 0, 0, 0, 0, 0, 1, 0}
} )
numericeigenvalues = Sort[Eigenvalues[reducedmatrixA] // Simplify // N]
symboliceigenvalues = α + β numericeigenvalues
does the trick. Thanks everyone for your pointers on the algebra.
Comments
Post a Comment