# \#eigenvalues

**URL:** https://discourse.julialang.org/tag/eigenvalues/666.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Solving the Helium Eigenvalue Problem—where to start?](https://discourse.julialang.org/t/solving-the-helium-eigenvalue-problem-where-to-start/137783)

<div class="topic-metadata">

**Author:** [@ducksoverip](https://discourse.julialang.org/u/ducksoverip)\
**Replies:** 8\
**Last updated:** [June 29, 2026, 7:18pm UTC](https://discourse.julialang.org/t/solving-the-helium-eigenvalue-problem-where-to-start/137783 "2026-06-29T19:18:53Z")

</div>

I have inherited Fortran code (the same one in this paper) that solves the time-independent Schrodinger equation for the ground state of the helium atom. This is generally a very difficult problem because the Schrodinger…

---

## [Eigenvalues of large, sparse matrices](https://discourse.julialang.org/t/eigenvalues-of-large-sparse-matrices/135208)

<div class="topic-metadata">

**Author:** [@pjk](https://discourse.julialang.org/u/pjk)\
**Replies:** 11\
**Last updated:** [January 23, 2026, 7:24pm UTC](https://discourse.julialang.org/t/eigenvalues-of-large-sparse-matrices/135208 "2026-01-23T19:24:55Z")

</div>

Hi all, I am working on a problem which involves the calculation of the eigenvalues (specifically the spectral radius) of matrices with a particular structure. These are specifically sparse, asymmetric matrices with bin…

---

## [Eigenvectors with the most overlap with v](https://discourse.julialang.org/t/eigenvectors-with-the-most-overlap-with-v/134008)

<div class="topic-metadata">

**Author:** [@Nichola](https://discourse.julialang.org/u/Nichola)\
**Replies:** 7\
**Last updated:** [December 18, 2025, 1:39am UTC](https://discourse.julialang.org/t/eigenvectors-with-the-most-overlap-with-v/134008 "2025-12-18T01:39:40Z")

</div>

Given a sparse matrix M and a vector v, I would like to get the k eigenvectors of M that have the most overlap with v. Is there an efficient method for doing this with sparse matrices ? All sparse solvers I ran into tar…

---

## [Efficient representation of a sparse "pentadiagonal" matrix?](https://discourse.julialang.org/t/efficient-representation-of-a-sparse-pentadiagonal-matrix/131744)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 8\
**Last updated:** [August 21, 2025, 6:53pm UTC](https://discourse.julialang.org/t/efficient-representation-of-a-sparse-pentadiagonal-matrix/131744 "2025-08-21T18:53:13Z")

</div>

I am interested in the eigenspectrum of Hermitian matrices that have a “pentadiagonal” structure, with A\[m,n\]=0 if abs(m-n)\>2. I am most interested in eigenstates with values close to zero. At present I am using Arpack.j…

---

## [Generalised eigenvalue problem with BigFloat](https://discourse.julialang.org/t/generalised-eigenvalue-problem-with-bigfloat/126197)

<div class="topic-metadata">

**Author:** [@fionah](https://discourse.julialang.org/u/fionah)\
**Replies:** 11\
**Last updated:** [March 12, 2025, 12:33pm UTC](https://discourse.julialang.org/t/generalised-eigenvalue-problem-with-bigfloat/126197 "2025-03-12T12:33:40Z")

</div>

I am trying to solve the generalised eigenvalue problem in arbitrary precision, using the BigFloat data type. using LinearAlgebra using GenericLinearAlgebra setprecision(128) println(eigen(Hermitian(rand(BigFloat, 2, …

---

## [Economy-sized eigendecomposition?](https://discourse.julialang.org/t/economy-sized-eigendecomposition/125037)

<div class="topic-metadata">

**Author:** [@benninkrs](https://discourse.julialang.org/u/benninkrs)\
**Replies:** 4\
**Last updated:** [January 25, 2025, 3:29pm UTC](https://discourse.julialang.org/t/economy-sized-eigendecomposition/125037 "2025-01-25T15:29:55Z")

</div>

Perhaps I’ve missed it, but is there a way to obtain the “economy” eigendecomposition of a matrix whose rank is less than the dimension? That is, if A is size n and rank r \< n, I would like to store just r eigenvalues a…

---

## [Generalized Eigenvalue Problem with singular matrix](https://discourse.julialang.org/t/generalized-eigenvalue-problem-with-singular-matrix/121759)

<div class="topic-metadata">

**Author:** [@Alejandra-CB](https://discourse.julialang.org/u/Alejandra-CB)\
**Replies:** 16\
**Last updated:** [November 4, 2024, 1:20pm UTC](https://discourse.julialang.org/t/generalized-eigenvalue-problem-with-singular-matrix/121759 "2024-11-04T13:20:40Z")

</div>

Hello everyone! I am currently working on a generalized eigenvalue problem, defined by the equation Aϕ=λBϕ, where matrix B is singular. Both matrices A and B are defined as sparse matrices, as I aim to apply this script…

---

## [Finding \*all\* the eigenvalues of a sparse matrix?](https://discourse.julialang.org/t/finding-all-the-eigenvalues-of-a-sparse-matrix/116895)

<div class="topic-metadata">

**Author:** [@rafaelbailo](https://discourse.julialang.org/u/rafaelbailo)\
**Replies:** 24\
**Last updated:** [July 18, 2024, 9:22am UTC](https://discourse.julialang.org/t/finding-all-the-eigenvalues-of-a-sparse-matrix/116895 "2024-07-18T09:22:44Z")

</div>

Seems that LinearAlgebra.jl does not work with sparse matrices, and the libraries that do (e.g. Arpack.jl, ArnoldiMethod.jl, KrylovKit.jl) all use iterative methods, which are not efficient to find all the eigenvalues. S…

---

## [Accelerating repeated eigenvalue searches](https://discourse.julialang.org/t/accelerating-repeated-eigenvalue-searches/114989)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 31\
**Last updated:** [June 14, 2024, 2:08pm UTC](https://discourse.julialang.org/t/accelerating-repeated-eigenvalue-searches/114989 "2024-06-14T14:08:23Z")

</div>

I need to compute the eigenvalues of 2N\\times2N (N ~ 1000) complex, hermitian, dense, matrices, the number of matrices being ~100. They have the following properties: All matrices M\_i take the form M\_i = A + D\_i, where…

---

## [Why does rand(Complex{Float64},N,N) always host a large eigenvalue?](https://discourse.julialang.org/t/why-does-rand-complex-float64-n-n-always-host-a-large-eigenvalue/114402)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 5\
**Last updated:** [May 17, 2024, 5:17pm UTC](https://discourse.julialang.org/t/why-does-rand-complex-float64-n-n-always-host-a-large-eigenvalue/114402 "2024-05-17T17:17:36Z")

</div>

rand(Complex{Float64},N,N) has a single huge eigenvalue: 1000-element Vector{ComplexF64}: -12.783541578066096 + 0.3846555290226826im -12.640629292870221 + 0.3298358788214941im -12.532390460903775 - 0.46833512398154803im…

---

## [KrylovKit, syntax issue](https://discourse.julialang.org/t/krylovkit-syntax-issue/110359)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 28\
**Last updated:** [February 21, 2024, 8:25am UTC](https://discourse.julialang.org/t/krylovkit-syntax-issue/110359 "2024-02-21T08:25:37Z")

</div>

So, I’m trying to use Lanczos diagnalization of a sparse marix of float64. Now I don’t want to specify the hint x0, so i just use rand(): Energy\[i\], psi\_ground, info = eigsolve(H\_super, rand(Float64, m\*2), 1, :SR, Lancz…

---

## [Krylovkit tolerance changes results drastically](https://discourse.julialang.org/t/krylovkit-tolerance-changes-results-drastically/110450)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 0\
**Last updated:** [February 20, 2024, 11:16am UTC](https://discourse.julialang.org/t/krylovkit-tolerance-changes-results-drastically/110450 "2024-02-20T11:16:17Z")

</div>

I’m writing a difficult to read code, just because I know the analytical result which is -0.274519. This value is meant to be compared with what is printed in the 4th column of this (a laptop is more than enough). When…

---

## [MKL package wrong results](https://discourse.julialang.org/t/mkl-package-wrong-results/110405)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 6\
**Last updated:** [February 19, 2024, 10:26pm UTC](https://discourse.julialang.org/t/mkl-package-wrong-results/110405 "2024-02-19T22:26:22Z")

</div>

I have this program. I post it as it is. If I write: using MKL using MKLSparse It gives me (that’s an iteration of results with a matrix parameter on the first column): 02 | -0.37499999999999944 | 0.0 | -0.1874999999…

---

## [@btime changes the result](https://discourse.julialang.org/t/btime-changes-the-result/110425)

<div class="topic-metadata">

**Author:** [@Enlil50](https://discourse.julialang.org/u/Enlil50)\
**Replies:** 2\
**Last updated:** [February 19, 2024, 10:15pm UTC](https://discourse.julialang.org/t/btime-changes-the-result/110425 "2024-02-19T22:15:52Z")

</div>

I will write a difficult to read program because I know its analytical solution. What you just need to to is putting @btime in front of the function call, at the end. Read the last result of the 4th column: With @btim…

---

## [Getting the eigen spectrum of a large matrix (representing a microgrid)](https://discourse.julialang.org/t/getting-the-eigen-spectrum-of-a-large-matrix-representing-a-microgrid/109781)

<div class="topic-metadata">

**Author:** [@Tony\_avito](https://discourse.julialang.org/u/Tony_avito)\
**Replies:** 4\
**Last updated:** [February 6, 2024, 10:36am UTC](https://discourse.julialang.org/t/getting-the-eigen-spectrum-of-a-large-matrix-representing-a-microgrid/109781 "2024-02-06T10:36:54Z")

</div>

Hello, I am really newb in Julia. I am looking to see a solution for finding the eigenvalues (eigen spectrum) of a microgrid. The grid matriz is not that big (47x47). I will be using some symbolic variables related to …

---

## [Some eigenpairs from a large, sparse, nonsymmetric matrix: Julia vs Matlab](https://discourse.julialang.org/t/some-eigenpairs-from-a-large-sparse-nonsymmetric-matrix-julia-vs-matlab/93742)

<div class="topic-metadata">

**Author:** [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Replies:** 22\
**Last updated:** [January 12, 2024, 4:18am UTC](https://discourse.julialang.org/t/some-eigenpairs-from-a-large-sparse-nonsymmetric-matrix-julia-vs-matlab/93742 "2024-01-12T04:18:21Z")

</div>

In the course of working through a book on frequency domain finite difference solutions for electromagnetics, I have been converting the supplied Matlab programs to Julia. For the problem of determining the modes of an …

---

## [Efficient computation of largest eigenvalue](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 9\
**Last updated:** [November 8, 2023, 3:48pm UTC](https://discourse.julialang.org/t/efficient-computation-of-largest-eigenvalue/105933 "2023-11-08T15:48:20Z")

</div>

For some numerical simulations I run, I need to construct a matrix and obtain its leading eigenvalue. I will make use of both of them. I was using the LinearAlgebra package, and computing the leading eigenvalue as maxim…

---

## [How Preconditioners work for multiple eigenpairs](https://discourse.julialang.org/t/how-preconditioners-work-for-multiple-eigenpairs/103456)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 4\
**Last updated:** [September 3, 2023, 6:16am UTC](https://discourse.julialang.org/t/how-preconditioners-work-for-multiple-eigenpairs/103456 "2023-09-03T06:16:25Z")

</div>

I am using Preconditioners.jl to precondition the eigensolver lobpcg in IterativeSolvers.jl. But the preconditioners didn’t worked for more than one vectors. Any ideas? This works when I need only one eigenpair. using …

---

## [Eigen values and vectors sorting](https://discourse.julialang.org/t/eigen-values-and-vectors-sorting/98637)

<div class="topic-metadata">

**Author:** [@papar](https://discourse.julialang.org/u/papar)\
**Replies:** 7\
**Last updated:** [May 10, 2023, 11:33pm UTC](https://discourse.julialang.org/t/eigen-values-and-vectors-sorting/98637 "2023-05-10T23:33:41Z")

</div>

I am trying to work out how to sort eigen values and eigen vectors that are consistent with other languages. I use the following code on a covariance matrix: eigen\_vals, eigen\_vector = eigen(covariance\_matrix) This gi…

---

## [Eigvals faster for ComplexF64 matrices than Float64](https://discourse.julialang.org/t/eigvals-faster-for-complexf64-matrices-than-float64/88846)

<div class="topic-metadata">

**Author:** [@ysh](https://discourse.julialang.org/u/ysh)\
**Replies:** 4\
**Last updated:** [October 18, 2022, 3:15pm UTC](https://discourse.julialang.org/t/eigvals-faster-for-complexf64-matrices-than-float64/88846 "2022-10-18T15:15:06Z")

</div>

I’ve noticed that when diagonalising real symmetric matrices, eigvals may perform faster if the input matrix is complex, i.e. Matrix{ComplexF64} rather than Matrix{Float64}. Here is my test code: using LinearAlgebra, Be…

---

## [Distributed eigensolvers for computing eigenpairs of large sparse matrices](https://discourse.julialang.org/t/distributed-eigensolvers-for-computing-eigenpairs-of-large-sparse-matrices/78648)

<div class="topic-metadata">

**Author:** [@Neo](https://discourse.julialang.org/u/Neo)\
**Replies:** 6\
**Last updated:** [September 28, 2022, 11:36am UTC](https://discourse.julialang.org/t/distributed-eigensolvers-for-computing-eigenpairs-of-large-sparse-matrices/78648 "2022-09-28T11:36:55Z")

</div>

Hi folks, I implemented a distributed method in Julia for computing smallest eigenvalues and the corresponding eigenvectors of large sparse (symmetric) matrices. I wanted to compare my implementation with a baseline eig…

---

## [Eigenvalue sensitivites using autodiff](https://discourse.julialang.org/t/eigenvalue-sensitivites-using-autodiff/80059)

<div class="topic-metadata">

**Author:** [@Hofsmo](https://discourse.julialang.org/u/Hofsmo)\
**Replies:** 5\
**Last updated:** [May 2, 2022, 6:30am UTC](https://discourse.julialang.org/t/eigenvalue-sensitivites-using-autodiff/80059 "2022-05-02T06:30:40Z")

</div>

Hi, I am quite new to both julia and autodiff and was wondering if someone can point me in the right direction. I have a dynamic system described using state space representation. I want to calculate the derivative of t…

---

## [Eigenvalues are approximately correct, not exactly](https://discourse.julialang.org/t/eigenvalues-are-approximately-correct-not-exactly/78952)

<div class="topic-metadata">

**Author:** [@Vahid\_Hosseinzadeh](https://discourse.julialang.org/u/Vahid_Hosseinzadeh)\
**Replies:** 6\
**Last updated:** [April 4, 2022, 2:50pm UTC](https://discourse.julialang.org/t/eigenvalues-are-approximately-correct-not-exactly/78952 "2022-04-04T14:50:21Z")

</div>

Hi everybody, using LinearAlgebra eigvals(\[0. 1im;1im 0.\]) gives: 2-element Vector{ComplexF64}: 0.0 + 0.9999999999999997im 2.7755575615628914e-17 - 1.0im which is correct but with approximation.…

---

## [Julia is slower than MATLAB at diagonalizing matrices](https://discourse.julialang.org/t/julia-is-slower-than-matlab-at-diagonalizing-matrices/78174)

<div class="topic-metadata">

**Author:** [@poopsilon](https://discourse.julialang.org/u/poopsilon)\
**Replies:** 41\
**Last updated:** [March 30, 2022, 4:04pm UTC](https://discourse.julialang.org/t/julia-is-slower-than-matlab-at-diagonalizing-matrices/78174 "2022-03-30T16:04:05Z")

</div>

I’ve been learning Julia in the past week and in the process, I have re-written one of my programs, which I previously implemented in MATLAB. I noticed the program in Julia was quite noticeably slower than the MATLAB ver…

---

## [Eigenvectors of a symmetric tensor and a matrix](https://discourse.julialang.org/t/eigenvectors-of-a-symmetric-tensor-and-a-matrix/77604)

<div class="topic-metadata">

**Author:** [@FrootLoops](https://discourse.julialang.org/u/FrootLoops)\
**Replies:** 2\
**Last updated:** [March 8, 2022, 8:09pm UTC](https://discourse.julialang.org/t/eigenvectors-of-a-symmetric-tensor-and-a-matrix/77604 "2022-03-08T20:09:35Z")

</div>

Hi, I have a problem calculating the eigenvectors of a matrix/tensor. Maybe someone can explain why the outputs differ from each other. using LinearAlgebra, Tensors A = \[-24.978551803697826 -51.42238499537693 0.0; -51…

---

## [CUDA porting to shift-inverse eigenvalues](https://discourse.julialang.org/t/cuda-porting-to-shift-inverse-eigenvalues/73691)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 0\
**Last updated:** [December 28, 2021, 12:26am UTC](https://discourse.julialang.org/t/cuda-porting-to-shift-inverse-eigenvalues/73691 "2021-12-28T00:26:22Z")

</div>

The Arpack eigenvalues solver is very fast. With a 100000x100000 sparse matrix, I can get a few eigenvalues with the shift-invert method in 20-30 seconds approximately! Since I always want the best performances, I wonde…

---

## [Reuse Eigen object](https://discourse.julialang.org/t/reuse-eigen-object/71494)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 3\
**Last updated:** [November 15, 2021, 5:43pm UTC](https://discourse.julialang.org/t/reuse-eigen-object/71494 "2021-11-15T17:43:16Z")

</div>

If I do using LinearAlgebra A = randn(100,100) B = A'\*A C = eigen(B) then how could I avoid allocating more memory by the next call to eigen with a 100 by 100 symmetric matrix? In other words, how could I reuse C? (I…

---

## [How to Find the maximum eigenvalue of the matrix](https://discourse.julialang.org/t/how-to-find-the-maximum-eigenvalue-of-the-matrix/71147)

<div class="topic-metadata">

**Author:** [@F-YF](https://discourse.julialang.org/u/F-YF)\
**Replies:** 1\
**Last updated:** [November 8, 2021, 1:06pm UTC](https://discourse.julialang.org/t/how-to-find-the-maximum-eigenvalue-of-the-matrix/71147 "2021-11-08T13:06:15Z")

</div>

The eigen () function is going to compute all the eigen values of the matrix, and that takes a long time, so I just want the biggest eigen value ,so how to do that?

---

## [Eigenvalues and extended precision](https://discourse.julialang.org/t/eigenvalues-and-extended-precision/68119)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 10\
**Last updated:** [September 14, 2021, 1:31pm UTC](https://discourse.julialang.org/t/eigenvalues-and-extended-precision/68119 "2021-09-14T13:31:15Z")

</div>

I am interested in computing a small proportion (between 3 and 10% of the matrix size) of the eigenvalues of a matrix with extended precision. As a toy example, let’s take the matrix A define by: T = Complex{Float128} N…

---

## [Eigen not working for arbitrary precision BigFloat](https://discourse.julialang.org/t/eigen-not-working-for-arbitrary-precision-bigfloat/67686)

<div class="topic-metadata">

**Author:** [@ekiral](https://discourse.julialang.org/u/ekiral)\
**Replies:** 16\
**Last updated:** [September 7, 2021, 11:11am UTC](https://discourse.julialang.org/t/eigen-not-working-for-arbitrary-precision-bigfloat/67686 "2021-09-07T11:11:51Z")

</div>

I try to use the function eigen defined on a matrix with BigFloat entries. The method does not work. julia\> matrix = \[BigFloat(2) BigFloat(3); BigFloat(3), BigFloat(2)\] julia\> matrix 2x2 Matrix{BigFloat}: 2.0 3.0 …

[Next page](https://discourse.julialang.org/tag/eigenvalues/666.md?match_all_tags=true&page=1&tags%5B%5D=eigenvalues)
