An Abstract Matrix Class and Derivatives and Cubic Spline