## How to solve Ax=b incrementally ?

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

Hi, everyone.

What I am struggling is the following problem. I have a linear matrix equation $Ax=b$, where $A$ is a known $n \times n$ large sparse real matrix, $x$ and $b$ are known $n \times 1$ vectors. Now, one entry of $A$ has changed into $a$ and we denote by this matrix $A'$. Since we make $b$ unchanged, the updated $A$ will cause the $x$ in the original linear eqaution accordingly changed to $x'$ such that $A'x'=b$. My goal is to find this new $x'$. A naive way is to re-solve $A'x'=b$. But since $A'$ is slightly different from $Ax=b$, is there any incremental way to fast solve $x'$ in $A'x'=b$ by taking advantage of the original equation $Ax=b$? Thank you very much for any of your kind suggestion!

-

1
Yes, if you know what entry that will change beforehand, just solve symbolically, and substitute a resp. b into the symbolic solution. – Per Alexandersson Apr 16 2011 at 8:04

## 3 Answers

Another method to update the solution is using the Sherman-Morrison formula: http://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formula in your case, $u$ and $v$ are canonical basis vectors.

So basically you have to solve two linear systems with $A$ and then you can update the solution for all possible values of $A$ with little work. Solve $2n$ linear systems, and you can update as many times as you want every entry of $A$ (only one at a time though).

Not sure that this is really your best option though --- all depends on how many "modified systems" you have to solve with the same starting matrix $A$. We need more information from you to decide this.

[By the way, as already pointed out, you'd better use a linear system solver which is suitable for sparse matrices: sparse LU or iterative methods.]

-

### You can accept an answer to one of your own questions by clicking the check mark next to it. This awards 15 reputation points to the person who answered and 2 reputation points to you.

As Fumiyo Eda already mentioned, you can use an iterative method such as GMRES to resolve the system after the change to $A$.

If you want to use direct LU factorization rather than an iterative method, look into "rank one update" techniques for the LU factorization.

-

An iterative scheme may do the trick. I would suggest looking into algorithms such as GMRES. Since you have a large, sparse matrix, there is a good chance you already have your matrix in a format that can be accepted by an iterative solver.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 29, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": false, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9529457092285156, "perplexity_flag": "head"}