# [Numpy-discussion] some work on arpack

Albert Strasheim fullung at gmail.com
Wed Aug 16 10:23:05 CDT 2006

```Hello all

> -----Original Message-----
> From: numpy-discussion-bounces at lists.sourceforge.net [mailto:numpy-
> discussion-bounces at lists.sourceforge.net] On Behalf Of David Grant
> Sent: 16 August 2006 17:11
> To: Discussion of Numerical Python
> Subject: Re: [Numpy-discussion] some work on arpack
>
>
>
> On 8/16/06, Keith Goodman <kwgoodman at gmail.com> wrote:
>
> 	On 8/15/06, David Grant <davidgrant at gmail.com> wrote:
>
> 	> My idea is (if I have time) to write an eigs-like function in
> python
> 	> that will only perform a subset of what Matlab's eigs does for. It
> 	> will, for example, compute a certain number of eigenvalues and
> 	> eigenvectors for a real, sparse, symmetric matrix (the case I'm
> 	> interested in)
>
> 	Will it also work for a real, dense, symmetric matrix? That's the
> case
> 	I'm interested in. But even if it doesn't, your work is great news
> for
> 	numpy.
>
> Real, dense, symmetric, well doesn't scipy already have something for
> this? I'm honestly not sure on the arpack side of things, I thought arpack
> was only useful (over other tools) for sparse matrices, I could be wrong.

Maybe SciPy can also do this, but what makes ARPACK useful is that it can
get you a few eigenvalues and eigenvectors of a massive matrix without
having to have the whole thing in memory. Instead, you provide ARPACK with a
function that does A*x on your matrix. ARPACK passes a few x's to your
function and a few eigenvalues and eigenvectors fall out.

I recently used MATLAB's eigs to do exactly this. I had a dense matrix A
with dimensions m x n, where m >> n. I wanted the eigenvalues of A'A (which
has dimensions m x m, which is too large to keep in memory). But I could
keep A and A' in memory I could quickly calculate A'A*x, which is what
ARPACK needs.

Cheers,

Albert

```