Simplify matrix operations

Matrix-matrix and matrix-vector multiplication subroutines were monstrous and way too complicated for this 2x2 case. No generality is needed here.