Hi folks, There's an error in Problem 1 on Homework 2. The problem asks you to compute M as an approximate right inverse for A, by minimizing norm(A*M-I,'fro') over matrices M with the same nonzero pattern as A. However, Matlab's GMRES uses its preconditioner as an approximate *left* inverse for A, which of course is not the same in general for nonsymmetric A. So your "spai" routine needs to compute M to minimize norm(M*A-I,'fro'). You could do this by building up M one row at a time instead of one column at a time. But that's an inefficient way to build a sparse matrix in Matlab (since Matlab sparse matrices are kept by columns). A better way is to compute M as the transpose of an approximate right inverse of A'. Got that? The Frobenius norm of a matrix is the same as the Frobenius norm of its transpose, so if we compute N to minimize norm( (A'*N - I), 'fro') = norm( (A'*N - I)', 'fro') = norm( (N'*A - I), 'fro') and then take M = N', we have the approximate left inverse that we want, which minimizes norm( (M*A - I), 'fro') You might try both preconditioners for WATT1. Why is their performance so similar? Many thanks to Stephanie Taylor for noticing the error. Second remark: WEST0479 is a hard matrix to precondition. Don't knock yourself out trying to get good results on it with SPAI -- just report the results you do get! Cheers, - John