27 votes
Accepted

Why do we usually not want the eigenvalues of non-symmetric matrices?

Stability under perturbations Let $E$ be a perturbation such that $\|E\| \leq \varepsilon$. If $A$ is symmetric, then the eigenvalues of $A+E$ are at a distance $\varepsilon$ from those of $A$. (Bauer-...
user avatar
23 votes
Accepted

Testing if a matrix is positive semi-definite

What's your working definition of "positive semidefinite" or "positive definite"? In floating point arithmetic, you'll have to specify some kind of tolerance for this. You could define this in terms ...
user avatar
15 votes
Accepted

Computational methods for finding the energy eigenvalues of the time-independent Schrodinger equation with arbitrary potential

Finding the eigenvalues for the Schrödinger equation is really similar to finding the eigenvalues for the wave equation. You start with your differential equation $$\left[-\frac{1}{2}\nabla'^2 + V(r)\...
user avatar
  • 7,902
14 votes
Accepted

Smallest eigenvalue without inverse

Compute the largest-magnitude eigenvalue $\lambda_{max}$ of $A$ (with, say, eigs('lm')). Then compute the largest magnitude (negative) eigenvalue $\hat{\lambda}_{...
user avatar
  • 2,096
14 votes
Accepted

Quality of eigenvalue approximation in Lanczos method

The convergence behavior you are seeing is actually expected. One of things that makes the Lanczos method so interesting is that it does a good job of simultaneously converging eigenvalues at both ...
user avatar
  • 5,734
13 votes
Accepted

Eigenvalues of Small Matrices

The first thing to note is that the correspondence between finding roots of a polynomial (any polynomial) and finding the eigenvalues of an arbitrary matrix is really direct, and it's a rich subject, ...
user avatar
  • 11.4k
13 votes
Accepted

How does the QR algorithm applied to a real matrix returns complex eigenvalues?

In a nutshell, the QR algorithm applied to a matrix $A$ is an iterative procedure that converges to the real Schur decomposition: a unitary matrix $Q$ and a matrix $R$ in block upper triangular form (...
user avatar
12 votes

Complex Eigenvalues using eig (Matlab)

You have an ill-conditioned eigenvalue problem. Consider a perturbation $\delta A$ in your matrix $A$—with double-precision floats this is $O(10^{-16})$. It turns the eigendecomposition from $$ X^{-1}...
user avatar
  • 11.4k
10 votes
Accepted

How does gmres method iteration behave for this non-diagonalizable matrix?

Unfortunately, convergence of GMRES does not have a clear dependence on the distribution of eigenvalues. It was proved by Greenbaum, Ptak and Strakos in 1996 that you can construct examples with an ...
user avatar
9 votes
Accepted

Compute all eigenvalues of a very big and very sparse adjacency matrix

You can use the shift-invert spectral transform [1] and compute the spectrum band by band. The technique is also explained in my article [2]. Besides the implementation in [1], an implementation is ...
user avatar
  • 2,165
9 votes
Accepted

Correct eigenfunctions of Laplace operator by Finite Differences

You should specify the eigenvalues you want with which="SM", for example. Check the following snippet. I also changed the solver, since your system is symmetric. <...
user avatar
  • 7,902
9 votes

Nonlinear eigenvalue problem - MATLAB code

Given a nonlinear eigenvalue problem of the form $A(\lambda)x = 0$, reducing it to a real equation $\det(A(\lambda))=0$ is known to be a poor method for just the reason you've discovered yourself. The ...
user avatar
  • 11.4k
9 votes
Accepted

Convexity of Sum of $k$-smallest Eigenvalue

Given $A \in {\bf S}^n$ (a positive definite matrix) with eigenvalues $\lambda_1 \leq \lambda_2 \leq \ldots \leq \lambda_n $, then: $\displaystyle f_k(A)=\sum_{i=1}^{k} \lambda_i$ is concave. Why? $$...
user avatar
  • 2,096
9 votes

Cheap recalculation of eigenvalues and eigenvectors for a low-rank update of the matrix

Unfortunately, I don't think there is a good algorithm to do this efficiently. Given the eigendecomposition $\mathbf A = \mathbf X \mathbf D \mathbf X^T$, one is tempted to project $\mathbf v$ onto ...
user avatar
  • 4,286
8 votes
Accepted

Eigenvalues of a sparse banded nonsymmetric matrix from an elliptic operator

The simple answer is that you would use inverse iteration (subspace or with deflation). This is basically the power method (repeatedly multiplying the matrix by a vector and normalizing, singling out ...
user avatar
  • 4,400
8 votes
Accepted

Stabilizing a 3x3 real symmetric matrix eigenvalue calculation

This is trying to compute the eigenvalues by computing the roots of the characteristic polynomial. In this case, the characteristic polynomial is $p(t) = t^3-2t^2x$, $x=1.25\times 10^6$, and zero is a ...
user avatar
  • 11.4k
8 votes
Accepted

Eigen - Max and minimum eigenvalues of a sparse matrix

There are two relatively convenient options for calculating selected (e.g. a few largest or smallest) eigenvalues using Eigen. The first is Spectra, a header-only C++ library based on Eigen that uses ...
user avatar
  • 5,734
8 votes
Accepted

How to compute all the eigenvalues of a large sparse matrix using matlab?

"Get more RAM" may be one of your best options. :) Prices are reasonably low right now, and it's one of the best upgrades you can gift your computer anyway. 10k x 10k is borderline but still doable ...
user avatar
8 votes
Accepted

Implementation of a $O(n \log(n))$ method to compute eigenvalues of real symmetric tridiagonal matrices

I think the method has too much implementation complexity and too narrow applicability to be worth it. Though the paper is correct to point out the importance of solving the tridiagonal-symmetric ...
user avatar
  • 4,286
8 votes

Is LAPACK behind the cutting edge of dense linear algebra?

When one says an algorithm is of order $O(n)$, that may mean that the complexity is given by: $c + b*n$. With every new element you add you increase in runtime (effectively). What mathematically ...
user avatar
  • 1,936
8 votes
Accepted

Can this simple quadratic optimization problem be turned into a simple eigenvalue problem?

At least for the second question the answer is yes. See for example Mattheij, Robert MM, and Gustaf Söderlind. "On inhomogeneous eigenvalue problems. I." Linear Algebra and its Applications ...
user avatar
  • 188
8 votes
Accepted

Python scipy eigh(Arpack) giving wrong eigenvalues for generalized eigenvalue problem

The matrix B (M in the documentation) needs to positive definite according to the documentation: "If sigma is None, M is positive definite", this is in addition to the first requirement &...
user avatar
7 votes
Accepted

roots of polynomials with small coefficients

Note that, if $D$ is invertible, the eigenvalues of $A$ and $DAD^{-1}$ are the same. You can avoid floating-point underflow when forming the matrix by scaling the companion matrix by a diagonal ...
user avatar
  • 372
7 votes

Is there an eigenvalue estimation method more accurate than Gershgorin's, which uses no multiplication?

Conclusions are indeed possible, but Gershgorin's circle theorem must be supplemented with other results. Let \begin{equation} \lambda_1 \leq \lambda_2 \leq \lambda_3 \leq \lambda_4 \end{equation} ...
user avatar
7 votes
Accepted

Eigenvalues of $ab^T$

This is sometimes known as Buzano's inequality (http://www.jstor.org/stable/2159168). In general, if $\|x\|=1$, $P=xx^{\top}$ is a projection operator, so a simple application of Cauchy-Schwarz leads ...
user avatar
  • 11.4k
7 votes

Eigenvectors of a small norm adjustment

There exist special techniques for updating the eigen-decomposition of time-dependent covariance matrices. Given a "prior" eigenvalue decomposition (say at some initial time $t^0$), these recursive ...
user avatar
  • 2,096
7 votes

Matlab, Mathematica & LAPACK returning 3 different eigenvectors

Seems that you have a duplicate eigenvalue. Thus, you have two eigenpairs $(\lambda_1, x_1)$ and $(\lambda_2, x_2)$ where $\lambda_1 = \lambda_2$. Denote $\lambda = \lambda_1 = \lambda_2$. Let $\alpha$...
user avatar
  • 1,832
7 votes
Accepted

Eigenvector with maximum overlap

The following paper suggests that the Jacobi-Davidson method can be used to target eigenvectors based on "any property that can be computed from the eigenvector", which would seem to include overlap ...
user avatar
7 votes

Why do we usually not want the eigenvalues of non-symmetric matrices?

Amazing question which has a long answer, but I will try to be concise. In the context of Krylov subspace methods for general matrices, the eigenvalues of a non-symmetric matrix mean very little. In “...
user avatar
6 votes
Accepted

Sparse generalized eigensolver using OpenCL

One possibility is to use a combination of ARPACK and ViennaCL: ARPACK is an eigensolver. It works with a callback interface (you supply a function that computes $Ax$ for a given $x$ and it computes ...
user avatar
  • 2,165

Only top scored, non community-wiki answers of a minimum length are eligible