# Julia is slower than matlab when it comes to matrix diagonalization?

**URL:** <https://discourse.julialang.org/t/julia-is-slower-than-matlab-when-it-comes-to-matrix-diagonalization/108658>\
**Category:** General Usage\
**Tags:** question, eigs, eigenvalue-problem\
**Created:** [January 11, 2024, 3:42am UTC](https://discourse.julialang.org/t/julia-is-slower-than-matlab-when-it-comes-to-matrix-diagonalization/108658 "2024-01-11T03:42:27Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 13, 2024, 6:21pm UTC](https://discourse.julialang.org/t/julia-is-slower-than-matlab-when-it-comes-to-matrix-diagonalization/108658/29 "2024-01-13T18:21:56Z")

</div>

> [@PetrKryslUCSD](#):
>
> The first six eigenvalues are zero, then come 2, 3, 3, 1, 2, 3 repeated eigenvalues.
> 
> I must be missing something. Is there an improvement that someone could suggest?

If the problem is definite, maybe you should be using shift-invert? (The Julia libraries won’t switch to shift-invert automatically.)

It’s hard to give more concrete advice without knowing your matrices.

It’s also not clear what is “not working” — the residual norms are small, so what is incorrect about the answers?

---

_[View the full topic](https://discourse.julialang.org/t/julia-is-slower-than-matlab-when-it-comes-to-matrix-diagonalization/108658)._
