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 ˆr1 (see below for definition) to be the gradient of f at ˆx=ˆx0, which equals
ˆAˆx0−ˆb,and ˆx0=0 it is equal −ˆb.