A mini-batch step averages a chosen subset of sample gradients before applying the same update rule.
Choose a small subset
A mini-batch step uses more than one row but not all rows. Here the chosen subset is s1+s2. Their sample gradients are (-1, 0) and (-1, -1).
gs1=(−1,0),gs2=(−1,−1)
Average those gradients
The mini-batch gradient averages just those 2 rows: (-1 + -1) over 2 gives -1, and (0 + -1) over 2 gives -1/2.
gmini=(−1,−1/2)
Apply the same update rule
With eta=1/2, the mini-batch update lands at (1/2, 5/4). The full-batch landing is (1/3, 7/6), and the one-sample landing is (1/2, 3/2).
(a,b)mini=(1/2,5/4)