small point but if we define the matrices to have the boolean \$$\Phi(x, y)\$$ at position row \$$y\$$ and column \$$x\$$ (ie the transpose of the above) then our matrix multiplication rule matches up nicely with composition, ie we get \$$\text{M}(\Psi\Phi) = \text{M}(\Psi)\text{M}(\Phi)\$$.