Questions tagged [eigenvalue]

The eigenvalue is the factor by which the eigenvector is scaled when multiplied by the matrix.

The eigenvectors of a square matrix are the non-zero vectors that, after being multiplied by the matrix, remain parallel to the original vector. For each eigenvector, the corresponding eigenvalue is the factor by which the eigenvector is scaled when multiplied by the matrix. The prefix eigen- is adopted from the German word "eigen" for "own"[1] in the sense of a characteristic description. The eigenvectors are sometimes also called characteristic vectors. Similarly, the eigenvalues are also known as characteristic values.

Find more on this topic on Wikipedia

747 questions
9
votes
3 answers

Python numpy compute first eigenvalue and eigenvector

I was wondering if there is a Python package, numpy or otherwise, that has a function that computes the first eigenvalue and eigenvector of a small matrix, say 2x2. I could use the linalg package in numpy as follows. import numpy as np def…
Ray
  • 7,833
  • 13
  • 57
  • 91
9
votes
4 answers

Eigenvalues in MATLAB

In MATLAB, when I run the command [V,D] = eig(a) for a symmetric matrix, the largest eigenvalue (and its associated vector) is located in last column. However, when I run it with a non-symmetric matrix, the largest eigenvalue is in the first…
Spencer
  • 245
  • 2
  • 5
  • 9
8
votes
0 answers

Eigen/Eigenvalues: Too many sections with mingw-w64

I want to compile the following example based on Eigen's general eigenvalue solver (Eigen 3.3.3): #include #include int main() { Eigen::Matrix4f A; A << -0.75, 0, -1.5, -1, -1.25, 0, -1.5, -1, …
MannyC
  • 91
  • 3
8
votes
2 answers

What's the best small C++ package to compute the largest eigenvalue of a matrix?

I need to compute the largest eigenvalue of a (sparse) matrix. I implemented the power iteration method, but it is too slow to converge, so I'd like to use a package for it. Does anyone have a recommendation? What is the best C++ eigenvalue…
Erin
  • 181
  • 1
  • 4
8
votes
4 answers

Simultaneously diagonalize matrices with numpy

I have a m × n × n numpy.ndarray of m simultaneously diagonalizable square matrices and would like to use numpy to obtain their simultaneous eigenvalues. For example, if I had from numpy import einsum, diag, array, linalg, random U =…
Anaphory
  • 6,045
  • 4
  • 37
  • 68
8
votes
2 answers

Mapping array back to an existing Eigen matrix

I want to map an array of double to an existing MatrixXd structure. So far I've managed to map the Eigen matrix to a simple array, but I can't find the way to do it back. void foo(MatrixXd matrix, int n){ double arrayd = new double[n*n]; // map…
Manolete
  • 3,431
  • 7
  • 54
  • 92
7
votes
1 answer

Matching similar eigenspectra in two matrices

I have two matrices for which part of the eigenspectrum of one matrix, very closely resembles the eigenspectrum of another matrix, but the only way I'm (currently) able to verify this is quite inelegant. I am open to any solution, but to present…
Nike
  • 1,223
  • 2
  • 19
  • 42
7
votes
1 answer

Eigenvectors are complex but only for large matrices

I'm trying to calculate the eigenvectors and eigenvalues of this matrix import numpy as np la = 0.02 mi = 0.08 n = 500 d1 = np.full(n, -(la+mi), np.double) d1[0] = -la d1[-1] = -mi d2 = np.full(n-1, la, np.double) d3 = np.full(n-1, mi,…
hellvetica
  • 119
  • 7
7
votes
1 answer

Computation of symbolic eigenvalues with sympy

I'm trying to compute eigenvalues of a symbolic complex matrix Mof size 3x3. In some cases, eigenvals() works perfectly. For example, the following code: import sympy as sp kx = sp.symbols('kx') x = 0. M = sp.Matrix([[0., 0., 0.], [0., 0., 0.],…
Azlof
  • 117
  • 1
  • 7
7
votes
2 answers

Plot a Correlation Circle in Python

I've been doing some Geometrical Data Analysis (GDA) such as Principal Component Analysis (PCA). I'm looking to plot a Correlation Circle... these look a bit like this: Basically, it allows to measure to which extend the Eigenvalue / Eigenvector of…
testing
  • 183
  • 1
  • 2
  • 6
7
votes
3 answers

GSL eigenvalues order

I am using the functions gsl_eigen_nonsymm and/or gsl_eigen_symm from the GSL library to find the eigenvalues of an L x L matrix M[i][j] which is also a function of time t = 1,....,N so i have M[i][j][t] to get the eigenvalues for every t i allocate…
Fra
  • 161
  • 8
7
votes
3 answers

how to calculate 2^n modulo 1000000007 , n = 10^9

what is the fastest method to calculate this, i saw some people using matrices and when i searched on the internet, they talked about eigen values and eigen vectors (no idea about this stuff)...there was a question which reduced to a recursive…
manu4rhyme
  • 83
  • 1
  • 4
7
votes
1 answer

Python OpenCV PCACompute Eigenvalue

When using Python 2.7.5 with OpenCV (OSX), I run PCA on a sequence of images (cols are pixels, rows are frames as per this answer. How do I get the eigenvalues corresponding to the eigenvectors? Looks like it's a property of the PCA object in C++,…
benxyzzy
  • 315
  • 3
  • 13
7
votes
2 answers

Find eigenvector for a given eigenvalue R

I have a matrix 100x100 and I found it's biggest eigenvalue. Now I need to find eigenvector corresponding to this eigenvalue. How can I do this?
user2080209
  • 749
  • 3
  • 8
  • 25
7
votes
2 answers

How do I find out eigenvectors corresponding to a particular eigenvalue of a matrix?

How do I find out eigenvectors corresponding to a particular eigenvalue? I have a stochastic matrix(P), one of the eigenvalues of which is 1. I need to find the eigenvector corresponding to the eigenvalue 1. The scipy function scipy.linalg.eig…
AIB
  • 5,894
  • 8
  • 30
  • 36
1
2
3
49 50