I am looking for a way to simplify dot products etc.
Here is a minimal example: Lets say I have two vectors a and b:
Now I evaluate their dot product:
c = a.b
which should give me something like this
ab + ab
What I need is a way to transform this expression back into a dot product. So I am looking for a function that realises that I can write this as a.b (similiar to "Factor" for polynomial expressions), e.g.
In a more general context, I would like to display scalars as vector/matrix/tensor expressions, meaning mathematica should also realize that
m[1,1] + m[2,2]
and display it as such.
Is that possible?