0
$\begingroup$

Consider the quadratic function $\mathbf{\frac{1}{2}x^TGx+b^Tx}$ in four variables where $$\mathbf{G}= \begin{bmatrix} 2 & -1 & 0 & 0 \\ -1 & 2 & -1 & 0 \\ 0 & -1 & 2 & -1 \\ 0 & 0 & -1 & 2 \end{bmatrix}$$ and $\mathbf{b}=(-1,0,2,\sqrt{5})^T$. Apply the conjugate gradient method to this problem from $\mathbf{x_0=0}$ and show that it converges in two iterations. Verify that there are just two independent vectors in the sequence $\mathbf{g_0,Gg_0,G^2g_0,\dots}$.

The algorithm I am going by is the following: enter image description here


If my first step starts from $(0,0,0,0)$ wouldn't the function become $0$. At that point how would I take the second step? I guess I'm not understanding how to iterate. My suspicion is that I need to calculate the step-length, $\alpha$. Is $\alpha$ same for quadratic and linear functions? I.e., $$\alpha=\frac{\mathbf{r_0^Tr_0}}{\mathbf{p_0^TGp_0}}$$ where $\mathbf{r_0=b-Gx_0}$? I am not sure if $\mathbf{p_0}$ is $\mathbf{r_0}$ or $\mathbf{-r_0}$.

Edit: My reference is Numerical Optimization by Jorge Nocedal (source)

  • 1
    You might want to provide a reference or your notes, as different authors have slightly different notation. As for your question, the gradient at $0$ doesn't vanish. So the iteration won't stop after the first step.2017-02-27
  • 0
    @user251257, thanks for your reply. I have updated my question. I hope the algorithm is enough. If not I can always add more! Are you defining the gradient as $$\frac{1}{2}G^Tx + \frac{1}{2}Gx + b=Gx+b$$ (since G is symmetric)?2017-02-27

0 Answers 0