[SciPy-user] Test for singular matrices

Nils Wagner nwagner at mecha.uni-stuttgart.de
Tue Dec 16 16:18:18 CST 2003

Dear experts,

The RQI begins with a fixed square, complex matrix A, an initial
estimated eigenvalue \mu_0,
and an initial estimated eigenvector x_0, then the algorithm iterates
the following steps

(a) Solve the system (A-\mu_n I) y = x_n
(b) let x_{n+1} be the unit vector in the direction of y
(c) \mu_{n+1} = x_{n+1}^H A x_{n+1}

I denotes the identity matrix

x0  = ones(n)
mu0 = rand(1)+rand(1)*1j
y   = linalg.solve(A-mu0*identity(n),x0)
x1  = y/linalg.norm(y)
mu1 = dot(conjugate(x1),dot(A,x1))
x0  = x1
mu0 = mu1

The iteration should halt when the system to be solved is singular, up
to numerical tolerance.

How can I realize this condition in scipy ? 

Thanks in advance.


More information about the SciPy-user mailing list