# Reinforcement Learning: In TD learning, why Forward equals to Backward Views

I am following this tutorial and try to understand why in TD($$\lambda$$) learning, the forward and backward view equals to each other. I got stuck at the following equation:

I understand how 7.9 gets into 7.10 but not the rest of the equations. It might be more of an algebra question but it bothers me too much not understanding the bath behind the scene. Any help would be appreciated!

Going from 7.10 to 7.11 is about switching the two sums. Consider 7.10, it is a sum over pairs (k, t) that look like this (for each k, there is a t from 0 to k):

• k=0: (0, 0)

• k=1: (1, 0), (1, 1)

• k=2: (2, 0), (2, 1), (2, 2)...

In 7.11 those pairs become (for each t, there is a k from t to T-1):

• t=0: (0, 0), (1, 0), (2, 0), ...
• t=1: (1, 1), (2, 1), (3, 1), ...
• ...

Notice how in the end we get the same pairs (k, t)? (the rows in the second example correspond to columns in the first one).

The answer is copied from my post on reddit