pH and Acid-Base Equilibrium Calculations via a Matrix Representation of Solutions of Acids and/or Bases