More Matrix Expressions

Adds a bit of logic and terms to matrix expressions

In my local directory I have some simplification work using LogPy.  I may put this into this PR to see what people think.