>[\$$\cdots\$$] they should take powers of the matrix

>\$\left( \begin{array}{cc} f & g \\\\ h & 0 \end{array} \right) \$

>by hand. The paths we're trying to count will just pop right out. But one still needs to think, to understand exactly why it works! It's not magic, just logic.

In order to do matrix multiplication, we need a multiplication and a sum operator. If we take composition \$$\lbrace\circ\rbrace\$$ to be our multiplication, what is the sum? Just simple old set union \$$\lbrace\cup\rbrace\$$?