Conjugate gradient method for positive-definite matrices