Help understanding the solver used in scipy spsolve and why its result is usually sparse

155 Views Asked by At

In scipy.sparse.linalg package there is a solver called spsolve that solves

$$ AX = b $$

where $A,b$ are a sparse matrices.

Here there is a claim being made that the result $X$ is often sparse, when $A$ and $b$ are very sparse.

However, from my understanding and experiments I did, the inverse of a sparse matrix $A$ is rarely ever sparse, and the product of a dense matrix with a sparse matrix may never be sparse. So how can we make the claim that $X$ is usually sparse?

My second question is concerning the solver used in spsolve. There is no literature reference on their webpage, so I am wondering if anyone knows the type of solver scipy uses, which would be helpful to understand under what conditions the result is sparse