Skip to main content
37 votes

How to check if a vector is an eigenvector of a matrix using mathematica?

You could use MatrixRank. Here is a function that does this: ...
Carl Woll's user avatar
  • 131k
37 votes
Accepted

Complex eigenvalues from a sparse Hermitian matrix

Very good observation. Indeed, this issue is really frustrating. To single out the issue: It seems that Arnoldi's method is to blame: ...
Henrik Schumacher's user avatar
32 votes

Eigenvalues broken in Version 12.0

Not a solution but too big for a comment. There seems to be a catastrophic failure in Eigenvalues happening that is not due to the matrix being crazy. As a ...
Roman's user avatar
  • 48.4k
21 votes
Accepted

Eigenvalues broken in 11.2?

This is a bug. The problem seems to be related to the fact that some rows of your matrix are packed arrays and some are not. ...
Szabolcs's user avatar
  • 236k
20 votes
Accepted

Making an interactive visualization of the eigenvectors of two-dimensional matrices

The following is an attempt to recreate a similar sort of interactive visualization, showing the eigenvectors (when real), and how the various points of the unit circle are transformed by the matrix. ...
glS's user avatar
  • 7,663
18 votes
Accepted

Finding Eigenvalues for a boundary value problem

Update: This implementation is now a package called CompoundMatrixMethod, hosted on github. It can be installed easily by evaluating: ...
SPPearce's user avatar
  • 5,663
16 votes

Library for FEAST method is missing

I just wanted to a bit more context here, and it is too long for a comment. First, there have always been platform differences in the available features, going back to V1. These were mostly on the FE ...
Itai Seggev's user avatar
  • 14.2k
14 votes
Accepted

Library for FEAST method is missing

I contacted the customer support and got the following reply: "The 'FEAST' method for functions like Eigensystem is part of the Intel MKL library, and as such will not be available to non-Intel ...
user99x's user avatar
  • 331
13 votes
Accepted

Eigendecomposition of a matrix with a variable

Your eigenvectors in EigenVec are normalized but not orthogonal to each other, as you can see using ...
user293787's user avatar
  • 11.9k
12 votes
Accepted

Solving the Schrödinger Equation by exact diagonalization

Eigenvalues and Eigenvectors return the eigenvalues sorted from highest to lowest. From the documentation: Eigenvectors with ...
Michael Seifert's user avatar
12 votes

How to numerically solve the Schrödinger equation for Lennard-Jones potential?

Here is a modified version of my answer to How to numerically solve a 1-d time-independent Schrödinger equation? that solves this problem. I use NDEigensystem ...
Jens's user avatar
  • 97.5k
12 votes

Eigenvalues broken in Version 12.0

Edit: Eigensystem fixed in 12.1 in addition to Eigenvalues I attempted a workaround, to see if Eigensystem had any issues also. It does. This is very unfortunate. ...
CA Trevillian's user avatar
12 votes

Lowest Magnitude Eigenvalues of Large Sparse Matrices

Use the Arnoldi method with shift-inversion: Eigenvalues[A, 3, Method -> {"Arnoldi", "Criteria" -> "Magnitude", "Shift" -> 0}] gives you the three ...
Roman's user avatar
  • 48.4k
12 votes

Routh-Hurwitz criterion not giving correct answer when done manually?

I can't say why your approach didn't work, but my RouthHurwitzCriteria function uses a simplified test for 3x3 matrices due to Fuller (1968), which I first learned about from Gandolfo (1997): There ...
Chris K's user avatar
  • 20.3k
12 votes
Accepted

Is there a bug in Eigensystem[]?

Notice that there are two eigenvalues, both degenerate: ...
Szabolcs's user avatar
  • 236k
11 votes

Solving this challenging ODE

I have a package for solving eigenvalue boundary value problems using the Compound Matrix Method with the Evans function, which is ideally suited to this. The package is available on my GitHub, a ...
SPPearce's user avatar
  • 5,663
11 votes
Accepted

Wrong eigenvalues from a sparse matrix

It appears that the proximity of the eigenvalues causes Eigensystem with the default parameters to be inaccurate. This can be fixed by increasing the basis size to 30 ...
Omrie's user avatar
  • 361
11 votes

How to set interface conditions for optical waveguide in NDEigensystem?

There are three conditions when we want to get eigenfunctions in Cartesian coordinates, similar to eigenfunctions in cylindrical coordinates. The first is the correspondence of boundaries. The second ...
Alex Trounev's user avatar
  • 45.8k
11 votes
Accepted

Eigenvalue problem

Weak method, the solution converges to the exact one at Nn >= 200. It takes time. Figure 1 shows the solution for Nn=100, 200 ...
Alex Trounev's user avatar
  • 45.8k
11 votes
Accepted

Fast method to calculating signature of a matrix

SeedRandom[1]; H = RandomReal[{-1, 1}, {100, 100}] // (# + #\[ConjugateTranspose]) &; Short[H, 3] ...
SnzFor16Min's user avatar
  • 2,240
10 votes

How to normalize a list of eigenvectors?

Here's a range of incremental improvements: ...
Szabolcs's user avatar
  • 236k
10 votes

Tracking Eigenvalues Through a Crossing

I'm not sure this will be robust enough for a 48 x 48 matrix. The idea is common enough: Build an interpolation of a function by integrating its derivative with ...
Michael E2's user avatar
  • 238k
10 votes

Tracking Eigenvalues Through a Crossing

Here's a CharacteristicPolynomial-free approach based on the formula for eigenvalue sensitivity ${d\lambda \over dB}={\vec u {dH \over dB} \vec v \over <\vec u,\...
Chris K's user avatar
  • 20.3k
10 votes

Solving this challenging ODE

Chebyshev Series solution A change of variables $\left\{ x \mapsto \frac{L}{2} (t+1)\,,\ w(x) \mapsto \frac{L}{2} u(t)\right\}$ converts the OP's differential equation to $$(t-1) u''(t)+u'(t)=\...
Michael E2's user avatar
  • 238k
10 votes

An ODE system easily polluted with spurious eigenvalues

NDEigenValues handles the pair of first-order equations in the question much more accurately, when it is converted into a single second-order equation. ...
bbgodfrey's user avatar
  • 61.8k
10 votes
Accepted

An ODE system easily polluted with spurious eigenvalues

The additional problem added to the end of the question can be solved in a similar manner. Begin with ...
bbgodfrey's user avatar
  • 61.8k
10 votes
Accepted

Nonlinear ODE eigenvalue problem

We want to find the value of $\lambda$ for which there exists a solution of the differential equation $u'' = \lambda ( - u + u^2)$, subject to the boundary conditions $u(0) = u(1) = 0$. We can do ...
Michael Seifert's user avatar
10 votes

Noise in Eigenvalues plot

By default, the eigenvalues are ordered by absolute value. All the eigenvalues of this particular matrix have the same absolute value plus some rounding errors. Thus, it can easily happen, that the ...
Henrik Schumacher's user avatar
10 votes
Accepted

Eigenvalues broken in Version 12.0

Fixed in 12.1 ...
Nasser's user avatar
  • 146k
10 votes

Possible bug in version 12 in solving the eigensystem

I think you hit an Indeterminate form. ...
Nasser's user avatar
  • 146k

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