Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8106879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:35:59+00:00 2026-06-06T00:35:59+00:00

Scipy and Numpy have between them three different functions for finding eigenvectors for a

  • 0

Scipy and Numpy have between them three different functions for finding eigenvectors for a given square matrix, these are:

  1. numpy.linalg.eig(a)
  2. scipy.linalg.eig(a), and
  3. scipy.sparse.linalg.eig(A, k)

Focusing specifically on the situation that all the optional arguments I’ve left off the last two are left at their defaults and that a/A is real-valued, I am curious about the differences among these three which are ambiguous from the documentation – especially:

  • Why does (3) have a note that it can’t find all eigenvectors?
  • Why must the other two compute all solutions – why don’t they take a k argument?
  • (1) has a note saying that the eigenvalues are returned in no particular order; (3) has an optional argument to control the order. Does (2) make any guarantees about this?
  • Does (3) assume that A is sparse? (mathematically speaking, rather than being represented as a scipy sparse matrix) Can it be inefficient, or even give wrong results, if this assumption doesn’t hold?
  • Are there other factors I should consider when choosing among these?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T00:36:00+00:00Added an answer on June 6, 2026 at 12:36 am

    The special behaviour of the third one has to do with the Lanczos algorithm, which works very well with sparse matrices. The documentation of scipy.sparse.linalg.eig says it uses a wrapper for ARPACK, which in turn uses “the Implicitly Restarted Arnoldi Method (IRAM) or, in the case of symmetric matrices, the corresponding variant of the Lanczos algorithm.” (1).

    Now, the Lanczos algorithm has the property that it works better for large eigenvalues (in fact, it uses the maximum eigenvalue):

    In practice, this simple algorithm does not work very well for
    computing very many of the eigenvectors because any round-off error
    will tend to introduce slight components of the more significant
    eigenvectors back into the computation, degrading the accuracy of the
    computation. (2)

    So, whereas the Lanczos algorithm is only an approximation, I guess the other two methods use algos to find the exact eigenvalues — and seemingly all of them, which probably depends on the algorithms used, too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will have to implement a convolution of two functions in Python, but SciPy/Numpy
Can MlPy / SciPy be used on GAE? I believe I have imported NumPy
Is it possible to determine the byte size of a scipy.sparse matrix? In NumPy
given a list of module names (e.g. mymods = ['numpy', 'scipy', ...]) how can
I'm using scipy.linalg to solve a matrix equation A*x = b The following code
How can I run hierarchical clustering on a correlation matrix in scipy / numpy
I have scipy and numpy, Python v3.1 I need to create a 1D array
I am trying to use scipy and numpy to perform matrix addition and multiplication.
I have a moderately large piece (a few thousand lines) of Python/Numpy/Scipy code that
In numpy/scipy I have an image stored in an array. I can display it,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.