Representing Matrices Using Algebraic ZX-calculus