Algebra and Matrix Calculus