MathMatrix data structure