One can show that the solution ˆx is also the unique minimizer of the quadratic form
f(ˆx)=12ˆxTˆAˆx−ˆxTˆx,ˆx∈Rn.This suggests taking the first basis vector ˆp1 to be the gradient of f at ˆx=ˆx0, which equals
ˆAˆx0−ˆb,and ˆx0=0 it is equal −ˆb. The other vectors in the basis will be conjugate to the gradient, hence the name conjugate gradient method.