13

I have been trying to figure out the time complexity of the conjugate gradient method.

I have to solve a system of linear equations given by

$$Ax=b$$

where $A$ is a sparse, symmetric, positive definite matrix.

What would be the time complexity of the conjugate gradient method?

user34790
  • 4,412

1 Answers1

19

$O(m\sqrt{k})$, where $m$ is the number of nonzero entries in $A$ and $k$ is its condition number.

See Chapter 10 in this excellent tutorial.

user7530
  • 50,625
  • 1
    Could you please clarify why Ref1 (sld 5) and Ref2 (pg. 163) state TC to be $O(n^3)$ instead? – jackphen Apr 21 '20 at 01:11
  • @jackphen That's for 1) dense matrices (contributing a factor $n^2$ instead of $m$ and 2) zero error instead of reducing the norm of the error by $\epsilon$ (contributing an additional factor $n$ instead of $\sqrt k$). – David Schneider-Joseph Sep 26 '23 at 21:13