# [PYTHON MATRIX-SIG] LAPACK module questions

**Konrad HINSEN
**
hinsenk@ere.umontreal.ca

*Wed, 14 Feb 1996 08:45:10 -0500*

I assume that the caller knows the structure of the storage methods and
packs it into an python array object. I have not used these functions
Yes, that's a reasonable assumption. After all, it's low level. A
good interface can always be added later by defining a Python class
representing e.g. a packed symmetric matrix.
What is a "generalized inverse"? If I remember correctly, the generalized
eigenvalue problem is (A - lambda C)x = 0 where C is a matrix. But I don't
remember running across a generalized inverse.
It's also known as a pseudoinverse or Moore-Penrose-inverse. There is
a uniquely defined generalized inverse for any matrix, and in the case
of a square non-singular matrix it is equal to the ordinary inverse.
Generalized inverses can be used to express the solution of over- or
underdetermined (or both) systems of linear equations conveniently,
and they are very useful in least-squares problems. The preferred way
to calculate the generalized inverse uses SVD: take the original
matrix, do SVD, invert all the non-zero singular values, multiply the
three matrices again, and return the transpose. Trivial to code in
Python based on low-level SVD calls.
-------------------------------------------------------------------------------
Konrad Hinsen | E-Mail: hinsenk@ere.umontreal.ca
Departement de chimie | Tel.: +1-514-343-6111 ext. 3953
Universite de Montreal | Fax: +1-514-343-7586
C.P. 6128, succ. Centre-Ville | Deutsch/Esperanto/English/Nederlands/
Montreal (QC) H3C 3J7 | Francais (phase experimentale)
-------------------------------------------------------------------------------
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================