I have a simple function:
$$ f(x)=x_1^2 + 2 x_2^2 -2 x_1 x_2 - 2 x_2 + 2 x_1$$ And I'd like to solve it using conjugate gradient method at initial point $x^0=(2,2)$. I found the hessian
$$ Q= \begin{bmatrix} 1 & -1 \\ -1 & 2 \\ \end{bmatrix} $$ And I found the conjugate directions starting with $d^0=-\nabla{f}(x_0)=[-2,-2].$
Now the next conjugate direction using the Gram Schmidt procedure is $d^1=[0,0]$. Usually this means that Gram Schmidt terminates and those are the directions. But this doesn't seem correct.
Am I not doing this properly? It would be great to see how to get the conjugate directions, and also how to apply the method to this problem. (Conjugate gradient method should only take max 2 iterations for this problem in theory).