Full-batch gradient descent averages the exact per-sample gradients before applying the update.
Per-sample gradients
For one row, the gradient of one-half squared error is residual times 1 for a and residual times x for b.
gi=(ri, rixi)
Full batch averages them
The full-batch gradient averages all 3 sample gradients: a-gradient -1, -1, 0 average to -2/3.
gfull,a=(−1+−1+0)/3=−2/3
The full gradient
The exact full-batch gradient is (-2/3, -1/3). No decimal approximation is used.
gfull=(−2/3,−1/3)