# Does conjugate gradient converge for negative definite matrices?

Guys I was reading about CG method to solve the sparse systems. I came across that the method is defined for positive definite symmetric matrices. I was wondering does it converges for negative definite matrices too ?

-
Not directly, CG minimizes a convex quadratic. However, you could solve $(-A)x = (-b)$, or modify the algorithm by changing signs at appropriate places (as in the difference between minimization and maximization is 'just' a sign difference). – copper.hat Nov 16 '12 at 4:13

$Ax =b \iff (-A) x = -b$, and if $A$ is symmetric negative definite then $-A$ is symmetric positive definite. So you can use CG to solve $-Ax = -b$.

-
So for convergence we compute 2-norm(b-Ax) < tolerance value. If yes then we say that it has converged to a solution. In this case we need to check for 2-norm( (-b) - (-Ax)) < tolerance, which is as good as 2-norm (Ax - b).. is that right ? – Anonym Nov 16 '12 at 4:16
Yes, sounds good. – littleO Nov 16 '12 at 4:19
ok. And what if we would like to solve for non-symmetric full-rank matrices using CG? In that case can we solve Ax = b as A'Ax = A'b using CG ? – Anonym Nov 16 '12 at 4:26
Thank You all for your help. – Anonym Nov 16 '12 at 4:39
@Anonym: If the Answer littleO gave is satisfactory, you can express your approval by Accepting it, which will also help others who may come across this thread to know it was well resolved. – hardmath Nov 16 '12 at 23:33