# Is it possible to use Eigtool for generalized problem pseudospectra?

I would like to use the Eigtool of professor Trefethen for pseudospectra but I have a generalized eigenvalue problem to solve: $$\lambda M x = K x.$$ It seems that Eigtool takes only one matrix as input. Is it possible to use the Eigtool my case too? I.e. having two matrices as input? In addition, my matrices are really big, but sparse, so I do not think that it is possible to invert them.

In my case $M$ is singular and not invertible.

• @Hsien-Ming Ku I believe that the case that M is non invertible or M is large and sparse that is of interest for Her.@Nora A friend of mine had a similar problem a while ago, I can ask him what was the solution. I think that the problem was named Lanczos generalized eigenvalue problem Jun 12 '15 at 2:43

Professor Mark Embree kindly answered to my emails. I report what he suggested to do:

"For large scale problems, this is what I generally recommend (note that this doesn't make special provisions for the energy norm):

• Use an iterative method (like "eigs" in MATLAB) to compute a d-dimensional dominant invariant subspace for inv(K)*M. Suppose the columns of V span this subspace (generally, the columns of V will be eigenvectors associated with the largest eigenvalues of inv(K)*M, which hopefully correspond to the rightmost eigenvalues of the pencil (K,M)).

• Let the columns of U form an orthonormal basis for V, e.g., in MATLAB, U = orth(V).

• Define Ginv = inv(U'*inv(K)MU). This will be a d-by-d matrix.

• Compute the pseudospectra of Ginv. These pseudospectra will be contained within the pseudospectra of the full-size problem that would come if you took V to span the invariant subspace associated with all the finite eigenvalues of the pencil. Experiment with enough values of the dimension "d" to make sure that the pseudospectra have converged in the rightmost part of the spectrum.

[...] Generally I have K and M stored as sparse matrices, then use K\M to compute inv(K)*M."

In my case it seems to work. I hope it will be useful for someone else too.

Maybe, you set $\lambda x = M^{-1}Kx$?, then if we need to implement the matrix-vector product in Eigtool:

$y = M^{-1}K v$, $v$ is any given vector.

Then you can do it by two steps:

(1) Compute the matrix-vector product: $u = Kv$; (2) Solve linear systems $My = u$.

I think that you can modified some lines in Eigtool.

• In fact, I only want to make it simple, so I use the notation $M^{-1}K$, however, as the following said, we do not need to compute the inverse of $M$, also $M^{-1}K$. On the other hand, we need to solve the linear systems $My = u$, so it will be easier than computing the inverse of matrix $M$. Jun 12 '15 at 13:14