A matrix can remember the running total
For the input , the running totals are , then , then . Put those three rules into rows:
The staircase of ones shows which inputs each output includes. A zero means “leave this input out.”
Turn each total into an average
Divide the first row by 1, the second by 2, and the third by 3:
Then the input becomes
Each row averages a longer prefix. The first output averages one number; the final output averages all three.
Why both rules are linear
The coefficients are fixed. Scaling every input scales each total or average by the same factor. Adding two input lists before applying the rule gives the same outputs as processing the lists separately and adding the results:
With fixed finite-dimensional bases, every linear map can be represented by a matrix. These running-total and running-average matrices are concrete examples.
Test the rule
What are the running averages of ?
Answer: . Each output uses a different number of inputs, but a fixed row of weights.
