# fast algorithm for solving system of linear equations

I have a system of linear equations, $Ax=b$, with $N$ equations and $N$ unknowns ($N$ large) If I am interested in the solution for only one of the unknowns, what are the best approaches?

for example, Assume N=50,000 and we want the solution for $x_1$ through $x_{100}$ only. is there any trick that does not require $O(n^{3})$ (or O(matrix inversion) ) for that ?

-

1
Is $A$ full or sparse? Are you doing this once or many times with the same $A$? – joriki Apr 1 '11 at 16:56
A is not sparse and has many nonzero elements, however, the coefficients themselves are derived from a smaller set of variables. – mghandi Apr 2 '11 at 3:37
About your second question, yes I'm doing this many times. I am familiar with the LU decomposition trick to speed up when the coeffs matrix is unchanged. Is there any other tricks to do that even more efficiently? – mghandi Apr 2 '11 at 3:51
– Dirk Dec 15 '12 at 17:43

## 2 Answers

Unless your matrix is sparse or structured (e.g. Vandermonde, Hankel, or those other named matrix families that admit a fast solution method), there is not much hope of doing things better than $O(n^3)$ effort. Even if one were to restrict himself to solving for just one of the 50,000 variables, Cramer will demand computing two determinants for your answer, and the effort for computing a determinant is at least as much as decomposing/inverting a matrix to begin with.

-

[this should be a comment to @Juan Joder's answer or to the OP's question, but not enough repo]

strang gilbert - linear algebra and its applications 3rd edition page 16 at the footer mentions that complexity had fallen already fallen below $O(Cn^{2.376})$ at the date of writing 1988, altough $C$ is so large that makes the algorithm impractical for most matrix sizes found in practice today. It does not mention the name of the algorithm though.

personal guess: not sure about solving for single variables, but I don't think you can reduce complexity like that since the entire system is coupled.

-
{"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": 12, "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": true, "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.9590341448783875, "perplexity_flag": "middle"}