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

Maria Michela SALVATORE, Marco GUIDA, Francesco SALVATORE

World Journal of Chemical Education OPEN ACCESSPEER-REVIEWED

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

Maria Michela SALVATORE1,, Marco GUIDA1, Francesco SALVATORE2

1Dipartimento di Biologia, Università degli Studi di Napoli “Federico II”, Via Cintia, 21 - 80126 Napoli, Italy

2Dipartimento di Scienze Chimiche, Università degli Studi di Napoli “Federico II”, Via Cintia, 21 - 80126 Napoli, Italy

Abstract

In this article we implement the idea of representing an aqueous solution of acids and/or bases with a matrix from which the pH and equilibrium concentrations of all species in any described solution can be extracted. Given that this matrix can be readily generated using an ad hoc MS Excel sheet, whatever pH calculation is reduced to the problem of selecting a row from the matrix by using as a guide the proton balance equation in the solution. A special scheme is presented allowing the needed proton balance relation to be derived from the specified solution data in all cases. This preserves the fundamental unity of the topic without sacrificing chemical understanding and simplicity. By consequence, the presented calculation technique is eminently suitable to be used in introductory courses as a complement, an extension or a substitute whenever the usual way of dealing with the topic (which, in general, consists in developing a menu of special cases, formulas and/or algebraic procedures) is judged insufficient. A MS Excel file named , attached to the present paper as supporting material, allows the matrix representation of any given solution to be developed in a very short time.

Cite this article:

  • Maria Michela SALVATORE, Marco GUIDA, Francesco SALVATORE. pH and Acid-Base Equilibrium Calculations via a Matrix Representation of Solutions of Acids and/or Bases. World Journal of Chemical Education. Vol. 3, No. 4, 2015, pp 93-110. https://pubs.sciepub.com/wjce/3/4/3
  • SALVATORE, Maria Michela, Marco GUIDA, and Francesco SALVATORE. "pH and Acid-Base Equilibrium Calculations via a Matrix Representation of Solutions of Acids and/or Bases." World Journal of Chemical Education 3.4 (2015): 93-110.
  • SALVATORE, M. M. , GUIDA, M. , & SALVATORE, F. (2015). pH and Acid-Base Equilibrium Calculations via a Matrix Representation of Solutions of Acids and/or Bases. World Journal of Chemical Education, 3(4), 93-110.
  • SALVATORE, Maria Michela, Marco GUIDA, and Francesco SALVATORE. "pH and Acid-Base Equilibrium Calculations via a Matrix Representation of Solutions of Acids and/or Bases." World Journal of Chemical Education 3, no. 4 (2015): 93-110.

Import into BibTeX Import into EndNote Import into RefMan Import into RefWorks

At a glance: Figures

1. Introduction

The usual way of dealing with Acid-Base equilibrium calculations, in introductory courses of general and analytical chemistry, consists, by necessity rather than by choice, in developing a menu of special cases, formulas and/or algebraic procedures from which the most appropriate item is selected to solve a given problem.

Obviously, there is not a menu comprising all possible cases. Furthermore, the risk of uncritical use of formulas disregarding approximations on which they are based is rather high (as demonstrated by the emblematic case of students who answer that the pH of a 10-10 M HCl solution is ten).

Apart from that, the main drawback of this approach is that it fragments the beautiful fundamental unity of the subject which is enclosed within a system of equations, which, however, is not easily solved (except in the simplest cases).

Obviously, in the computer era, a direct mathematical attack to the problem is possible and ready-to-use programs are available for calculation of pH and of equilibrium concentrations of all species in whatever solution of acids and/or bases (if the pertinent data are available).

Nevertheless, whereas such programs produce results very efficiently, their educational value is questionable because the user, in general, does not know how results are obtained neither he feels responsible for them.

In this article we develop the idea of enclosing an aqueous solution of acids and/or bases within the frame of a suitable matrix, which is called mySolutionMatrix, with the aim of providing a calculation strategy which can fill voids in an educationally proper way and which gives the opportunity, at the end of an introductory course, of extending the subject beyond the usual limits.

The suggested approach to Acid-Base equilibrium calculations recovers the unity of the topic and is capable of producing smoothly the solution to whatever problem.

The user is fully responsible of results, since these are generated by a self made tool operating in a mathematically transparent way under its active chemical guidance (which is, of course, not the case when one utilizes a ready-to-use pH-Calculator).

In fact, the calculation technique is fundamentally based on the proton balance equation (also known as proton condition) which must be deduced, from the given analytical composition of the considered solution, by the user.

The concept that in any solution of acids and/or bases a proton conservation equation must exist is not a new one but cases are frequently encountered for which capturing mathematically this relation is not immediate and which require very enlightening manipulations of the given data.

For these reasons, much space and a special strategy are dedicated to the issue of obtaining the proton condition from the specified solution data, which, in and by itself, is a worthy accomplishment regardless of the technique used to solve a given problem.

2. Background

Any solution of acids and/or bases can be represented by a matrix that will be called mySolutionMatrix.

In abstract, mySolutionMatrix contains Ns + 1 columns.

Ns represents the number of chemical species created in the considered solution by Acid-Base equilibria set up by dissolved substances with Acid-Base properties.

On the other side, by choice, mySolutionMatrix contains 282 rows and then a total of 282·(Ns+1) elements.

Elements in the first row (row 1) of mySolutionMatrix are labels. The first label is <pH> and the remaining Ns labels are of the type < [ j ] >, which is the usual symbol for the molar equilibrium concentration of species j (for instance [j] may be [H+], [OH-], [CH3COOH]; [CH3COO-]; [H3PO4]; [H2PO4-]; [HPO42-]; [PO43-]; etc..)

Labels in the first row of mySolutionMatrix identify the content of each of the Ns +1 columns of the matrix.

The first column of mySolutionMatrix (identified by label < pH >) is filled with 281 pH values from pH = 0 (row 2) up to pH = 14 (row 282) spaced 0.05 pH units; then, the pH value corresponding to the first element of row n is pH = (n-2)×0.05.

Elements in the first row (labels) and first column (pH values) of mySolutionMatrix may also serve for identifying any of the remaining 281· Ns elements of the matrix whose row and column can be specified by the coordinates (pH, [j]).

One can also describe mySolutionMatrix as an ordered sequence of 282 vectors each containing Ns + 1 elements. The first vector is for labels and it is followed by 281 additional vectors each having, as its first element, a number between 0 and 14 representing a pH value and as many additional elements as the species in the given solution. In this representation, a row or vector of mySolutionMatrix can be identified by the pH value (which is its first element).

For instance, in a solution of ammonia plus phosphoric acid there are 8 different species (H+, OH-, NH3, NH4+, H3PO4, H2PO4-, HPO42- and PO43-) so that each of the 281 vectors of mySolutionMatrix will be constituted by a pH value and 8 additional elements.

Scheme 1. Scheme for row 1 (labels) and vector at pH = 6.95 of mySolutionMatrix representing a solution of ammonia plus phosphoric acid

To be more detailed, row 1 and vector number 141 of mySolutionMatrix (at pH = 6.95) will appear as in Scheme 1.

Elements of mySolutionMatrix are positive numbers, but in order to understand their significance and how they are generated, it is necessary a brief excursus through the mathematics governing Acid-Base equilibria.

As we have mentioned above, the topic of calculating the pH and the equilibrium concentrations of all species in a solution of acids and/or bases can be reduced to the mathematical problem of solving a system of equations with as many equations as the number of species present at equilibrium in the considered solution. This abstract system of equations will be mentioned as the main system of equations.

The equations of the main system have a very important feature: they are separable in groups which will be called sub-systems.

In other words the main system of equations can be split in a number of sub-systems.

Each sub-system exposes as unknowns only the equilibrium concentrations of species which differ in the number of bonded protons plus the H3O+ concentration, i.e., [H3O+] (or [H+]), which appears in all sub-systems and, because of this, can be thought as the master variable which pilots Acid-Base equilibria.

By consequence, it is useful to address a collection of species which only differ in the number of bonded protons as an Acid-Base group so that we can simply state that each Acid-Base group in a solution defines a sub-system of equations.

Obviously, in an Acid-Base group there may be couple of species which constitute a conjugate Acid-Base pair and others that differ for more than one bonded proton and which are not conjugate species.

For instance the carbonic acid Acid-Base group contains three species H2CO3, HCO3- and CO32-. These species constitute the Acid-Base group of carbonic acid and differ from each other for the number of bonded protons; but H2CO3 and HCO3- is a conjugate couple, while H2CO3 and CO32- it is not.

As exemplified above we will refer to an Acid-Base group using the name of one whatsoever of the species that belong to the group. For instance, to the Acid-Base group (H2CO3, HCO3-, CO32-) we will apply, as convenient, equivalently, the names of carbonic acid, bicarbonate or carbonate Acid-Base group.

An Acid-Base group can be transferred into a solution dissolving a variety of substances. For instance, both the dissolution of potassium bicarbonate (KHCO3) and sodium carbonate (Na2CO3) transfer into a solution the carbonic acid Acid-Base group.

In any given solution there will be, for a given Acid-Base group into the solution, a defined group concentration which is, by definition, the sum of the concentrations of all species belonging to the group. Group concentrations can be deduced from data specifying the analytical composition of the solution. For instance, in a solution which has been prepared by transferring 0.1 moles of KHCO3 to 1 litre of solution, the carbonic acid group concentration is 0.1 M. On the contrary, in a solution which has been prepared by transferring 0.1 moles each of KHCO3 and Na2CO3 to 1 litre of solution, the carbonic acid group concentration is 0.2 M

For our purposes, the number of different species in an Acid-Base group is very important and will be indicated by NGS. For brevity, NGS may also be called the group number.

In fact, on the basis of the group number, one can classify Acid-Base groups in a number of Acid-Base group types. Acid-Base groups of the same type, i.e., which have the same group number, have a number of formal properties in common, which do not depend on the particular chemical nature of species in the group.

In order to discuss questions that apply to all Acid-Base groups of the same type, we will use a model prototype Acid-Base group as an abstract surrogate of all groups of the same type.

The abstract group constituted by species (HA, A-) is the surrogate of any group with NGS = 2 and is called monoprotic acid group type; analogously, groups constituted by species (H2D, HD-, D2-), (H3T, H2T-, HT2-, T3-) and (H4F, H3F-, H2F2-, HF3-, F4-) are abstract surrogates of groups with, respectively, NGS = 3 , NGS = 4 and NGS = 5 and are called diprotic acid, triprotic acid and tetraprotic acid group types.

In other words, any real Acid-Base group has a reference model group and, furthermore, each species in a real Acid-Base group has a matching species in its reference model group.

For instance, the model group of the ammonia Acid-Base group, (NH4+, NH3), is, obviously, (HA, A-); NH4+ matches with HA and NH3 matches with A-.

Analogously, (H2D, HD-, D2-) is the reference model group for carbonic acid Acid-Base group, (H2CO3, HCO3-, CO32-); H2CO3 matches with H2D, HCO3- with HD- and CO32- with D2-.

In other words, matching species in Acid-Base groups with the same group number are a couple of species with the same number of dissociable protons.

Acid-Base groups of the same type always have the same number of acid dissociation constants, pKai, which connect species into the group as can be seen from Figure 1.

Figure 1. Acid dissociation constants,, connecting species in various Acid-Base group types.

Furthermore, Acid-Base groups of the same type share a mass balance relation of the same form, as can be deduced from the following equations (1), (2), (3) and (4), which are the mass balance equations, respectively, for the monoprotic acid, diprotic acid, triprotic acid and tetraprotic acid model group types:

(1)
(2)
(3)
(4)

Symbols , , , which appear in equations (1), (2), (3) and (4) indicate group concentrations.

One can also interpret equations (1), (2), (3) and (4) as definitions of the group concentrations.

Mass balance equations for real Acid-Base groups in the considered solution are easily generated from equations (1), (2), (3) and (4) by substituting symbols for species of the model groups with symbols for matching species in the real Acid-Base group.

Please note that, when one starts a pH calculation, the analytical composition of the solution is supposed to be assigned and so are supposed to be the group concentrations which can, in general, be easily deduced from the composition of the solution. In addition, the acid dissociation constants of all Acid-Base groups in the solution are assumed to be known. In fact, obviously, one can only eventually calculate the pH of a solution whose analytical composition is described and for which all the necessary equilibrium constants are known.

Finally, each Acid-Base group in the solution defines a sub-system of NGS equations, which is part of the main system of equations, and sub-systems defined by Acid-Base groups of the same type share a common format.

In its most immediate and understandable form, a sub-system is always constituted by the mass balance of the Acid-Base group plus the (NGS - 1) equilibrium expressions for the (NGS - 1) acid dissociation constants, , which connect species within the group according to the scheme in Figure 1.

However, mass balance and low of mass action expressions for the NGS -1 acid dissociation constants of this primordial sub-system can be rearranged in a more useful form which is presented in Table 1 for the four model prototype groups.

In order to obtain the sub-system defined by a real Acid-Base group present in a solution, at an assigned group concentration, symbols for abstract species in the sub-systems of Table 1 are substituted with symbols for matching species in the real Acid-Base group and appropriate numerical values are substituted for the group concentration and the dissociation constants.

By way of example, the simple acetic acid Acid-Base group will define the sub-system comprising the two equations (20) and (21) (i.e., a mass balance equation and a law of mass expression for its acid dissociation constant):

(20)
(21)

Equations (20) and (21) are easily rearranged to equations (20a) and (21a):

(20a)
(21a)

Equations (20a) and (21a) are of the general form of equations (6) and (7) in Table 1 and can be obtained directly by substituting CH3COOH and CH3COO- for HA and A- respectively.

In a practical case, equations (20a) and (21a) may be applied, for instance, to a solution in which the group concentration of the acetic acid Acid-Base group is CCH3COOH = 0.1 M. In this hypothetical case, assuming that the dissociation constant of acetic acid is pKa = 4.75, we finally obtain equations (20b) and (21b), which represent the actual sub-system of equations defined by the acetic acid Acid-Base group when present in a solution at a total concentration of 0.1 M:

(20b)
(21b)

Equations (20b) and (21b) hold in any solution in which the group concentration of the Acid-Base group (CH3COOH, CH3COO-) is 0.1 M. For instance, they also hold in a solution which has been prepared by dissolving 0.1 moles of sodium acetate in 1 litre or in any mixture of acetic acid and sodium acetate in which the sum of the number of moles of acetic acid and sodium acetate transferred to one litre of solution is 0.1 M.

Please note that equation (20b) and (21b) are not modified if in the acetic acid / acetate solution are present other substances with Acid-Base properties.

All sub-systems in Table 1 have the same significance exposed above for the sub-system of the monoprotic acid group type and can be used to generate actual sub-systems of equations for real Acid-Base groups in the considered solution.

In other words, according to formulas in Table 1, the equilibrium concentration of each species present in a solution of acids and/or bases can be specified a priori as a function of the pilot variable [H3O+] and this function, which embodies as parameters the analytical group concentration and the group’s pKai, holds in any solution containing that species, regardless of other substances eventually present.

Formulas in Table 1 are sufficient for the needs of students engaged in general chemistry or analytical chemistry courses, but similar expressions for the six species belonging to pentaprotic acid group type, the seven species of the esaprotic acid group type, etc..., can be smoothly developed and integrated into the presented frame.

We can express the equilibrium concentration of each species, in any considered solution of acids and/or base, as a function of pH by selecting a suitable formula from Table 1 and substituting the pertinent group concentration and dissociation constants. For a given real species, the formula to be selected in Table 1 is the formula of the matching species in its reference model group.

For instance, in order to express the equilibrium concentration of phosphate, [PO43-], as a function of pH (i.e., [H+] = 10-pH) in a solution which contains a total phosphate concentration of 0.1 M, we select formula (14) from Table 1. In fact, formula (14) in Table 1 corresponds to [T3-] which is the species matching [PO43-]. Then we substitute PO43- for T3-, 0.1 M for CH3T and we insert Ka1 = 10-2.15, Ka2 = 10-7.20, Ka3 = 10-12.15 (which are the three stepwise dissociation constant of phosphoric acid) and, finally, we obtain relation (22):

(22)

Technically we shall say that equation (22) is an instance of the model equation (14) in Table 1.

Table 1. Equations (5)-(19) expressing the equilibrium concentrations of OH- and of species belonging to the four model Acid-Base groups as a function of the pilot variable [H+] ≡ [H3O+]

With this definition in mind, we can now simply state that in order to express the equilibrium concentration of whatsoever species [j] in a solution of acids and/or basis as a function of pH or [H+], we have to make an instance of the formula, in Table 1, for the model species matching j.

By definition, for each species, j, in a given solution of acids and/or basis there will be a column in mySolutionMatrix bearing as its first element label [j]. By definition, to each element of column [j], it is assigned the pH (or [H+]) of its row.

Finally, to the element of column [j] in a row of given pH, it is assigned the value of [j] calculated from the instance of formula in Table 1 for the species of the model group matching j.

For example, column [PO43-] that appears in mySolutionMatrix representing a solution containing a total phosphate concentration of 0.1 M, it is filled with 281 [PO43-] values calculated from equation (22) with the 281 pH values in the first column.

This procedure is, in abstract, repeated for each species in the considered solution, and it will produce mySolutionMatrix, which by construction contains a value for the equilibrium concentration of each species in the considered solution at each of the 281 pH values in column <pH>.

Please note that equilibrium concentrations in a row of mySolutionMatrix share a common pH that is the pH of the row.

Furthermore, it is important to realize that, by construction, the concentrations of the species belonging to each Acid-Base group in the solution, in any row of mySolutionMatrix, satisfy the dissociation equilibria within the group and the mass balance of the group.

In other words, each row extracted from mySolutionMatrix is, for what concerns the dissociation equilibria and the mass balances of the Acid-Base groups in the solution, a valid candidate to contain the pH and equilibrium concentrations of the species in the represented solution.

Obviously, any specified solution has a unique pH and unique equilibrium concentrations, which are buried in a single row or vector of mySolutionMatrix.

Finally, once mySolutionMatrix has been constructed, the solution of any problem of pH calculation is converted to the problem of selecting from the sequence of 281 numerical rows which compose mySolutionMatrix the one which best corresponds to the assigned solution. This vector we are searching for will be called mySolutionVector.

Obviously, we need a guide in the process of selection of mySolutionVector from mySolutionMatrix, and this guide is provided by the proton balance equation which, for brevity, will be mentioned as proton condition.

Equilibrium concentrations, which are the numeric elements of mySolutionMatrix, can readily be generated in a MS Excel sheet developed for this purpose and which is called matrixGenerator. Values generated by matrixGenerator are then copied and pasted in a new Excel sheet which finally will expose mySolutionMatrix.

It must be understood that, once the matrixGenerator sheet has been developed, we will be able to create, in a matter of seconds, the matrix representing whatever solution of acids and/or bases and that there is no limit to the complexity of solutions which can be represented (since this will merely increase the number of species in the solution and, by consequence, the number of columns in mySolutionMatrix).

3. Developing and Using matrixGenerator Excel Sheet

3.1. Developing matrixGenerator

MatrixGenerator is essentially a MS Excel sheet (renamed matrixGenerator) in which suitable text for labels of species, numerical values for concentrations and pKai, and code to implement formulas from (5) to (19) in Table 1, at each of 281 pH values between 0 and 14, is entered.

A matrixGenerator.xlsx MS Excel file is attached to this paper as supporting material for the reader convenience. However, it is strongly recommended that students develop their own matrixGenerator according to instructions below.

This can be done very easily copying text and code from Table 2 and Table 3 and pasting in the indicated cells of matrixGenerator Excel sheet.

For this consider that each editable cell of MatrixGenerator Excel sheet, identified according to Excel style by a capital letter and a number coincides with an element of MatrixGenerator.

For building MatrixGenerator one can start by copying the content of each cell of columns 2 and 4 of Table 2 and pasting it in the cell of MatrixGenerator indicated to the left.

Labels in Table 2 and, by consequence in matrixGenerator, describe species from the four prototype Acid-Base groups of Figure 1, while numerical values are the default values which are assigned to group concentrations and to acid dissociation constants according to the scheme in Figure 1.

Table 2. Text and numerical values to be entered in the indicated cells of MS Excel sheet to build MatrixGenerator

It is convenient before continuing, to select cells in the whole sheet and apply to them the scientific number format with two decimal digits (i.e., x.xxE ± yy).

After this, we have to enter code for generating numerical values calculated from formulas in Table 1.

For this refer to Table 3 and for each of the Excel cells indicated in the first column copy the code on the right and paste it in matrixGenerator Excel sheet.

Except for cell A3, all code is entered in a cell of row 2 of matrixGenerator sheet just under the cell containing the symbol for species indicated in the third column of Table 3.

Formulas in Table 3, entered in the indicated cells of row 2 of matrixGenerator Excel sheet, are, finally, extended, throughout each column, with the standard Excel tools, up to the corresponding cell in row 282.

Table 3. Excel code, corresponding to formulas from (5) to (19) in Table 1, to be entered in the indicated cells of row 2 of matrixGenerator sheet

First select cell A3 and drag, with the left mouse button, on the small square in its right corner in order to replicate formula in cell A3 up to cell A282 (this operation will fill column under label <pH> with 281 pH values from 0 to 14 spaced 0.05 pH units). Please, change the number format in column A from scientific to normal with two decimal places so that numbers indicating pH appear as zz.zz.

Then, perform the same drag operation on all cells of row 2 of matrixGenerator which contain a formula (these are the cells under symbols [...] which indicate species).

After these operations, matrixGenerator will be filled with numbers and will have the appearance shown in Figure 2 (only first 20 rows of MatrixGenerator are represented).

Eventually, apply cell styles to replicate the appearance of matrixGenerator in Figure 2 and save the file as <matrixGenerator.xlsx>

Labels ←H₂O|HA→, ←HA|H₂D→, ←H₂D|H₃T→ and ←H₃T|H₄F→, respectively, in cells E1, I1, N1, and T1 are spacers which divide matrixGenerator sheet in five sections with different meanings.

Area on the left of spacer ←H₂O|HA→ contains values for [H+] and [OH-] and the ionic product of water. Between spacers ←H₂O|HA→ and ←HA|H₂D→ there is an area reserved to the monoprotic Acid-Base group type; between spacers ←HA|H₂D→ and ←H₂D|H₃T→ there is an area for the diprotic Acid-Base group type; between spacers ←H₂D|H₃T→ and ←H₃T|H₄F→ there is an area for the triprotic Acid-Base group type; finally, on the right of spacer ←H₃T|H₄F→ there is the area reserved to the tetraprotic Acid-Base group type.

MatrixGenerator is created with default values for concentrations and acid dissociation constants of the four model Acid-Base group types. These values, with corresponding labels, are in columns H, M, S and Z respectively for the monoprotic, diprotic, triprotic and tetraprotic model group types. Default value for all four Acid-Base group concentrations is 0.1 M (in cells H3, M3, S3, Z3).

Default values for the acid dissociation constants are as follows:

{(HA, A-), pKa = 9.2 (cell H5)};

{(H2D, HD-, D2-), pKa1 = 6.35 (cell M5), pKa2 =10.33 (cell M7)};

{(H3T, H2T-, HT2-, T3-), pKa1 = 2.15 (cell S5), pKa2 =7.20 (cell S7), pKa3 =12.15 (cell S9)};

{(H4F, H3F-, H2F2-, HF3-, F4-), pKa1 = 1.70 (cell Z5), pKa2 = 2.40 (cell Z7), pKa3 = 5.95 (cell Z9), pKa4 = 10.17 (cell Z11)}.

Default value of the ionic product of water is 14.00 and has been entered in cell D2.

3.2. Using matrixGenerator for Creating mySolutionMatrix

We now use matrixGenerator Excel sheet developed in the previous section to build mySolutionMatrix which is by definition the matrix which represents a given solution of acids and/or bases and which will be used for calculating the pH and the equilibrium concentrations of all species in the given solution.

To be more specific, the pH will always be calculated with an uncertainty of + 0.05 or - 0.05 pH units (which depends on spacing between consecutive pH values in column A of matrixGenerator sheet). This spacing can be reduced if one wishes a better precision. The same applies to the range of pH considered which can be extended inserting additional rows. MatrixGenerator can also be developed further to deal with pentaprotic, esaprotic, etc. acids.

In order to build mySolutionMatrix, we start by renaming a new sheet in Excel. It is very useful to rename this sheet according to the analytical composition of the represented solution. However, for convenience, we will apply the generic name mySolution to this sheet which, by definition, will expose mySolutionMatrix.

In our matrix representation, mySolutionMatrix for pure water is an invariant matrix (which, eventually, only depends on the temperature which affects the value of the ion product of water, pKw (in cell D2 of matrixGenerator sheet) and which is made up of columns A, B and C of the matrixGenerator sheet. These columns are identified by labels pH, [H+] and [OH-] and are copied a pasted as values in mySolution sheet in the first step taken to build the matrix representation of whatever solution. So we can describe the process of building the matrix representation of any given solution as starting with building the matrix for pure water.

Then, we return to matrixGenerator and identify each Acid-Base group in the given solution with a corresponding model Acid-Base group in matrixGenerator. After this, we substitute the default values of group concentrations (i.e., ) and pKai with the actual values for Acid-Base groups in the considered solution. As new values for the parameters are entered, all cells in matrixGenerator sheet are updated.

We now select columns in matrixGenerator corresponding to each of the species in our solution and we paste them as values in consecutive columns of the mySolution sheet. When we paste the copied values, it is useful to update labels in the first row of mySolution sheet by substituting the generic labels (HA, A-), (H2D, HD-, D2-) and (H3T, H2T-, HT2-, T3-), etc., with the real formula of the matching species in the solution. We can repeat this operation as many times as necessary until we have produced in mySolution sheet a column for each species present in the considered solution.

In practice, however, once concentrations and pKai for real Acid-Base groups in the considered solution have been entered in matrixGenerator, all columns of interest for the case considered are selected simultaneously, using standard Excel commands, copied and pasted in a single operation in mySolution sheet.

Please note that once one has developed matrixGenerator, mySolutionMatrix is created just in the time necessary to enter suitable values for concentrations and acid dissociation constants and to perform a copy and paste operation.

Finally, MySolution sheet now exposes mySolutionMatrix whose elements coincide with cells of the sheet and, for our purposes, describes the considered solution.

After this, we have to write the proton balance relation (i.e., the proton condition) which is our guide to select from mySolutionMatrix the row which best represents the solution considered. In fact, mySolutionMatrix is useless without the proton condition and this is because much space is dedicated in the following to the item of developing a general procedure which allows writing the proton condition for whatsoever solution (although for the simplest problems the proton condition can be written in the blink of an eye, once some practice has been gained).

Figure 2. MatrixGenerator Excel sheet after entering text and code in Table 2 and Table 3

4. The Art of Writing the Proton Condition

4.1. General Strategy

In this section we face the problem of writing the fundamental relation (i.e., the proton condition) which we shall use in order to select from the matrix representing a given solution a row which in all respects contains values which solve our problem.

At the basis of our strategy for obtaining the proton condition which applies to the solution at hand there is the consideration that free protons do not exist in an aqueous solution, although they might well exist somewhere else.

If free protons cannot be created in a solution, any time a species dissociates a proton (becoming poorer in protons) there must be a species which accepts and stabilizes the dissociated proton (and, in so doing, it becomes richer in protons). In other words, in an aqueous solution protons can only be transferred between species.

Then, in any given solution at equilibrium, there must be an economical balance between species which have become poorer in protons and species which have become richer, in the way of establishing equilibrium into the solution.

In order to capture mathematically this economical balance our strategy is that of selecting, for each Acid-Base group present in the considered solution, a protons reference species which therefore splits the species within the group between protons richer and protons poorer species.

A Richness Index (RI) and a Poorness Index (PI) is then attributed, respectively, to each protons richer species and to each protons poorer species. Both, RI and PI are positive integers which are calculated as the absolute difference between the number of protons in the appropriate reference species and the number of protons in the considered protons richer or protons poorer species.

For convenience, and will be used as general labels for qualifying, respectively, protons richer and protons poorer species. For instance species qualified as PrR2 and PrP3 species have, respectively, two protons more and three protons less than their reference species.

The general form of the proton condition which we will adopt and implement in the following is represented by equation (24), which can be spelled in the following way: at equilibrium, the sum of concentrations of protons richer species (each multiplied by its richness index) must be equal to the sum of the concentrations of protons poorer species (each multiplied by its poorness index):

(24)

Obviously, equation (24) can be used only after a process of selection of protons reference species (which unambiguously split the species within each Acid-Base group present in the solution in protons richer and protons poorer species) has been completed and each species in the solution has been classified as or . To this process which may be very straightforward or may encounter some difficulties, is devoted the rest of this paragraph.

It can be seen from equation (24), that H3O+ and OH- occupy a special position in water since H3O+ is always considered a PrR1 species and OH- a PrP1 species. This depends upon the fact that in an aqueous solution the reference species for the Acid-Base group (H3O+, H2O, OH-) is always assumed to be H2O.

Other protons reference species (one for each Acid-Base group) are selected scrutinizing the data which specify the analytical composition of the solution and which, for convenience, will be collected in an analytical array, which has the general form {Cx X + Cy Y + ... + ...} and exposes substances used to prepare the solution, i.e., X, Y, etc. and the corresponding molar concentrations, i.e., Cx, Cy, etc..

For instance, analytical arrays (25) and (26) represent, respectively, a mixture of phosphoric acid and ammonia, and a mixture of phosphoric acid, monobasic and dibasic sodium phosphates (at the specified concentrations):

(25)
(26)

For our purposes, first of all, the analytical array is scanned in order to recognize the Acid-Base groups which are transferred to the solution by the declared substances. In general, all the species belonging to the identified Acid-Base groups will be present in the solution and are considered unknowns to be calculated.

For instance, array (25) transfers to the solution the Acid Base groups (H3PO4, H2PO4-, HPO42-, PO43-) and (NH4+, NH3), respectively, at group concentrations of 0.1 M and 0.2 M.

On the other side, array (26) transfers to the solution Acid-Base groups (H3PO4, H2PO4-, HPO42-, PO43-) and (Na+, NaOH) at group concentrations, respectively, of = 0.125 M and (0.025 +2·0.05) = 0.125 M.

After this, substances in the analytical array are (virtually) disaggregated, if necessary, in a number of individual chemical constituents which match species in the identified Acid-Base groups. Any species in the identified Acid-Base groups may appear as a constituent in the disaggregated array except H+ and OH-.

In a first, simplest and very frequent case, there will be a single constituent in the disaggregated array which fits in each identified Acid-Base group. We will, then, say that each Acid-Base group is transferred to the solution in the form of a single initial species which coincides with the matching constituent in the disaggregated array. This matching species is assumed as the protons reference species for the corresponding Acid-Base group and no particular elaborations are needed.

For instance, in the analytical array (25), only H3PO4 fits in the Acid-Base group (H3PO4, H2PO4, HPO42, PO43) and only NH3 fits in the group (NH4+, NH3); by consequence, protons reference species are H3PO4 and NH3.

From this choice of protons reference species we deduce the following classification: H2PO4- ≡ PrP1, HPO42- ≡ PrP2, PO43- ≡ PrP3, NH4+ ≡ PrR1.

By implementing this classification in equation (24), we obtain, for solution described by array (25), the following proton condition (27):

(27)

However, our dissection of the analytical array might also demonstrate that there are two or more possible constituents of the disaggregated array which fit in a single Acid-Base group, so much so that we must conclude that this Acid-Base group is transferred to the solution in the form of two or more initial species.

A dilemma then arises concerning the selection of the reference species for this Acid-Base group. This happens, for instance, for solution described by array (26) since, at first glance, seems that three possible constituents of the disaggregated array, i.e., H3PO4, H2PO4- and HPO42-, fit in the phosphoric acid Acid-Base group.

However, a fundamental consideration, for our purposes, is that, within the analytical array representing a solution, protons can be redistributed as convenient for the problem at hand. In fact, insofar that the total protons concentration is preserved, the Acid-Base properties of the solution are not altered by this process of protons redistribution.

This implies that we can attempt to redistribute protons within the array until, eventually, an array is generated which exposes a single species for each Acid-Base group in the solution. This is the case of solution (26) since, by exchanging a concentration of 0.05 M of protons in H3PO4 for the same concentration of Na+ in Na2HPO4, the initial array (26) is converted to array (26a):

(26a)

Now, the key point is that, with regard to our problem of selecting reference species, array (26a) can easily be disaggregated in such a way that only H2PO4- fits in the phosphoric acid Acid-Base group, and only Na+ fits in the group (Na+, NaOH) so that the protons reference species are H2PO4- and Na+. By consequence, array (26a) is substituted and used throughout instead of array (26).

Finally, we smoothly deduce the following classification of species in the solution: NaOH ≡ PrP1, H3PO4 ≡ PrR1, HPO42- ≡ PrP1, PO43- ≡ PrP2.

From this classification equation (24) is readily implemented and proton condition (28) obtained:

(28)

However, consider now analytical array (29) which, at first sight, seems very similar to array (26):

(29)

However, since the concentration of H3PO4 in array (29) is not equal to the concentration of Na2HPO4, (as it was in array (26)) the process of redistribution of protons within the array will not be sufficient to disambiguate array (29). For instance, we can easily reduce array (29) to array (29a) by transferring a concentration 0.02 M of protons from H3PO4 to HPO42-:

(29a)

Whereas array (29a) is less ambiguous than initial array (29), because has eliminated H3PO4 as a possible protons reference species, it is still inadequate since it exposes two constituents which fit in the Acid-Base group (H3PO4, H2PO4-, HPO42-, PO43-), i.e., H2PO4- and HPO42- which are transferred simultaneously to the solution.

In cases like this, in order to disambiguate the analytical array, we will resort to the special strategy suggested in the following.

For our purposes, we introduce a soluble fictitious salt, RQ, of the cation R+ and anion Q-, whose dissolution transfers to the solution the two fictitious Acid-Base groups, (R+, ROH) and (HQ, Q-). Furthermore, we assume that ROH is a very strong base and HQ is a very strong acid. To avoid misunderstandings we take pKa = 24 and pKa = -10 respectively for the acid dissociation constants of R+ and HQ. In order to remember these definitions, one can simply remember that RQ is, from an Acid-Base point of view, a salt very similar to NaCl.

With these definitions, it is obvious that the abstract operation of dissolving any amount of RQ into whatever solution will not change its pH (assuming that activity coefficients keep unchanged).

For brevity, we will say that the dissolution of the abstract RQ salt into whatever solution creates a pH-Equivalent solution.

Whenever the process of redistributing protons is not sufficient to disambiguate an analytical array, we will create a suitable pH-Equivalent solution and redistribute protons within the array representing the pH-Equivalent solution. In fact, provided an appropriate concentration of the virtual RQ salt is hypothetically transferred into the pH-Equivalent solution, the process of redistributing protons within the array representing the pH-equivalent solution will be sufficient to remove ambiguities concerning the choice of protons reference species. Calculations are then performed on the pH-Equivalent solution and results are finally transferred to the original solution.

For instance, the original solution represented by array (29) is reduced to the less ambiguous array (29a) after redistributing protons and a concentration of 0.065 M of RQ salt is added, so that array (29a) is changed to array (29b), which represents a pH-Equivalent solution:

(29b)

We now convert NaH2PO4, whose concentration in the pH-Equivalent solution is, by purpose, identical to that of RQ, to NaRHPO4 by exchanging a concentration of 0.065 M of protons from NaH2PO4 with the same concentration of R+ from the RQ salt and obtain, from array (29b), the equivalent array (29c):

(29c)

According to array (29c), four different Acid-Base groups are transferred to the solution, i.e., groups (Na+, NaOH), (H3PO4, H2PO4-, HPO42-, PO43-) and, in addition, groups (R+, ROH) and (HQ, Q-).

The key point is that each group is transferred to the solution as a single species of the group, respectively, Na+, HPO42, R+ and HQ. These species are then smoothly assumed as reference species and they will not appear in the proton condition.

Other species are classified as it follows: NaOH ≡ PrP1, H3PO4 ≡ PrR2, H2PO4- ≡ PrR1, PO43- ≡ PrP1, ROH ≡ PrP1, Q- ≡ PrP1.

On the basis of this classification and equation (24), proton condition (30) is obtained:

(30)

Now we observe that the equilibrium concentrations of NaOH and ROH, which are strong bases, never reach significant values so that proton condition (30) can be simplified to proton condition (31):

(31)

Equation (31) is exactly what would be obtained considering for the pH-equivalent solution the effective Acid-Base composition (29d):

(29d)

which is derived from array (29c), disregarding Na+ and R+. Finally, we use array (29d) for our calculations and transfer results to the original solution.

Namely, we construct the matrix representing a solution containing the phosphoric acid Acid-Base group at the group concentration of (0.065 + 0.03) = 0.095 M and the fictitious group (HQ, Q-) at a group concentration of 0.065 M. We then use proton condition (31) to select a vector from this matrix according to the procedure in the next paragraph.

It must be understood that also in this case we have reduced the equilibrium calculation to the problem of selecting a row (vector) from a matrix by implementing the proton condition (31). In fact, once the vector representing the pH-Equivalent solution has been found, our problem is solved because the vector representing our initial solution (mySolutionVector) is readily obtained (from the vector representing the pH-Equivalent solution) by discarding elements containing values for [HQ] and [Q−], which, obviously, have no physical significance.

(Na+, NaOH) Acid-Base group (and all similar groups which exposes a strong base) can always be considered as a normal monoprotic Acid-Base group type having a very large pKa. However, this will be strictly necessary only in the case the Acid-Base group (Na+, NaOH) is transferred to the solution in the form of NaOH, whereas it can be altogether eliminated from the scenario when it is transferred to the solution in the form of Na+ (as we have done above). Analogously, (HCl, Cl-) Acid-Base group (and all similar groups which exposes a strong acid) can always be considered as a normal monoprotic Acid-Base group type having a very low negative pKa value. This will be strictly necessary when the (HCl, Cl-) Acid-Base group is transferred to the solution in the form of HCl, whereas it can altogether be eliminated from the scenario when it is transferred to the solution in the form of Cl-.

4.2. Additional Comments on the Proton Condition

The proton condition is written following equation (24) which is based on the concepts of protons reference species, protons richer species () and protons poorer species (), and related concepts of richness index (RI) and poorness index (PI):

(24)

Reference species do not appear in the proton condition, protons richer and protons poorer species are gathered, respectively, in the left side and in the right side members of equation (24).

A special and simplest case is represented by pure water. In fact, in whatsoever aqueous solution, H2O, is the protons reference species for the Acid-Base group (H3O+, H2O, OH-), since water is always introduced as H2O. The proton condition for pure water is then the obvious relation (32):

(32)

Now, as we add to water substances with Acid-Base properties, the starting proton condition (32) becomes more and more crowded, because further species will appear in the solution and a number of these will be designated as species and their equilibrium concentrations will appear in the left side member of the proton condition; other species, designated as will crowd the right side member of the proton condition. It is correct to think that the length of the proton condition reflects the complexity of the current solution. Concurrently, mySolutionMatrix, which always starts with the pure water matrix, acquires new columns.

By the way of example, suppose that we dissolve acetic acid in water. This is the laboratory operation which transfers the (CH3COOH, CH3COO-) group to the solution as CH3COOH, which then is assumed as the protons reference species. Only CH3COO-, which is classified as , must be added in the right hand side of the proton condition (32) of pure water. This yields the proton condition (33) which applies to whatever solution of acetic acid, regardless of its concentration:

(33)

On the other side, if we transfer the (CH3COOH, CH3COO-) group to the solution dissolving sodium acetate, the reference species is CH3COO-. In this case, CH3COOH is classified as species and, by consequence, only [CH3COOH] is added in the left side member of the pure water proton condition. We have:

(34)

Nevertheless, strictly, equation (34) is not the exact proton condition for a sodium acetate solution, because it ignores the fact that dissolving sodium acetate two different Acid-Base groups are introduced in the solution, i.e., (CH3COOH, CH3COO-) and (Na+, NaOH). Since Na+ is the reference species for the (Na+, NaOH) group, the exact proton condition is equation (35), in which NaOH appears as a species:

(35)

From a practical point of view, the use of equation (34) in place of equation (35) does not make any difference, since Na+ is an extremely weak acid and species NaOH does never assume a significant concentration under the usual conditions. Then, the Acid-Base group (Na+, NaOH) can be ignored when it is transferred to the solution as Na+. However, this consideration does not apply when the (Na+, NaOH) group is transferred to the solution as NaOH. In this case the proton condition must expose Na+ as a species and the (Na+, NaOH) group can be treated formally as a normal monoprotic acid group type having a very large and fictitious pKa, for instance pKa =16, consistent with the qualitative idea that NaOH is a strong base. This applies to any group which contains a strong base.

Symmetrically, the proton condition of an ammonium chloride (NH4Cl) solution is written for practical purposes as in equation (36):

(36)

But strictly, it should be written:

(37)

in consideration of the fact that the laboratory operation of dissolving NH4Cl transfers to the solution two Acid-Base groups, i.e., (NH4+, NH3) and (HCl, Cl-).

However, since HCl is a strong acid, [HCl] never assumes significant values under the usual conditions, so that proton condition (36) and (37) are practically equivalent. Then, the Acid-Base group (HCl, Cl-) can be ignored if it is introduced as Cl-. This consideration does not apply when the (HCl, Cl-) group is transferred to the solution as HCl, in which case the proton condition will expose [Cl-] as a species. When necessary, the (HCl, Cl-) Acid-Base group can be treated as a monoprotic acid group type with a negative value of pKa, for instance pKa = -7. This applies to all groups which contain a strong acid.

For instance, we can distil the composition, say of a 0.1 M NH4Cl solution in {0.1 M NH3 + 0.1 M HCl}, which is a less conventional view of the composition of the same solution. From our point of view, stating the composition of the 0.1 M NH4Cl solution as {0.1 M NH3 + 0.1 M HCl}, although unusual, is perfectly acceptable. However, if this view is assumed, the Acid-Base group (HCl, Cl-) cannot be ignored and must be inserted in the matrix representation and in the proton condition which then assumes the form (38):

(38)

Either, proton condition (36) or (38) can be used to calculate the pH and equilibrium concentrations of species in a solution 0.1 M NH4Cl which is analytically equivalent to {0.1 M NH3 + 0.1 M HCl}.

This kind of distillation of the analytical composition of an NH4Cl solution is very useful in case we are presented with a pH buffer, say {0.05 M NH4Cl + 0.02 M NH3}. As given, the composition of the solution is not appropriate for writing the proton condition since both species of the Acid-Base group (NH4+, NH3) are recognized in the analytical array. However, by distilling the composition as we have shown above, it results in the analytical array {0.05 M HCl + 0.07 M NH3} which (whereas equivalent to the initial array {0.05 M NH4Cl + 0.02 M NH3}) carries the fundamental characteristic that each Acid-Base group is transferred to the solution as a single initial species, i.e., HCl and NH3 (which are then assumed as the proton reference species). Therefore, the proton condition for the solution {0.05 M HCl + 0.07 M NH3} is still equation (38) (which is implemented in a matrix representing a solution containing the Acid-Base groups (HCl, Cl-) and (NH4+, NH3) at group concentrations, respectively, of 0.05 M and 0.07 M).

Example → Consider the commercial potassium tetraoxalate solution that is sold under the name <Buffer solution pH = 1.679> and whose analytical composition is given as {0.05 M KH3(C2O4)2}, which seems to be a very simple analytical array.

It is obvious that this solution contains the Acid-Base group (K+, KOH) at a group concentration of 0.05 M and the Acid-Base group (H2C2O4, HC2O4-, C2O42-) at a group concentration of 2·0.05 = 0.1 M.

For the matrix representation of this solution, as of any solution, there are no problems at all.

In fact, since the (K+, KOH) Acid-Base group is introduced as K+, it can be disregarded. Then, we only have to enter, in matrixGenerator, 0.1 M for the concentration of the diprotic acid group type and the two dissociation constants of oxalic acid (pKa1 = 1.25 and pKa2 = 4.266; at 25°C and zero ionic strength); then, to a new Excel sheet renamed, for instance, <TetraOxalate>, we transfer as values (by a single copy/paste operation) columns with labels pH, [H+], [OH-], [H2D], [HD-], [D2-]; finally, labels [H2D], [HD-], [D2-] are updated to [H2C2O4], [HC2O4-], [C2O42-], respectively.

Problems are met in writing the proton condition because, no matter how we redistribute protons of potassium tetraoxalate solution, two different species of the group (H2C2O4, HC2O4-, C2O42-) are recognized in the analytical array.

For instance, the declared composition is clearly equivalent to {0.05 M KHC2O4 + 0.05 M H2C2O4}, from which it is seen at a glance that H2C2O4 and HC2O4- are simultaneously transferred to the solution.

Although with some practice this problem can be solved very easily, it is useful for newcomers to apply the above described general strategy.

To this end, we introduce in the tetraoxalate solution a suitable concentration of the fictitious RQ salt. In this case addition of 0.05 M RQ salt is suitable because it converts the initial solution to the pH-equivalent solution: {0.05 M KHC2O4 + 0.05 M H2C2O4 + 0.05 M RQ} which, after exchanging 0.05 M protons for R+ between H2C2O4 and RQ is converted to: {0.05 M KHC2O4 + 0.05 M RHC2O4 + 0.05 M HQ}.

This implies simply that our initial solution can be imagined as a mixture of the very strong acid HQ and bioxalate.

Since K+ and R+ can be ignored, and since the Acid-Base groups (H2C2O4, HC2O4-, C2O42-) and (HQ, Q-) are transferred to the pH-Equivalent solution exclusively via HC2O4- and HQ, respectively, the following classification of species in the pH-Equivalent solution results: HC2O4- reference species, H2C2O4 ≡ PrR1, C2O42- ≡ PrP1, HQ ≡ reference species, Q- ≡ PrP1.

From this classification and equation (24) proton condition (39) is readily written:

(39)

Proton condition (39), is implemented in the matrix representing the pH-Equivalent solution, i.e., {0.1 M HC2O4- + 0.05 M HQ}, which, obviously, differs from the previously generated matrix of {0.05 M KH3(C2O4)2} only because contains two additional columns representing [HQ] and [Q-]. We generate these two columns in the matrixGenerator entering, in the monoprotic acid group type section, 0.05 M for the group concentration and pKa = -10. Then, we copy columns [HA] and [A-] and, finally, we paste them as values in the <TetraOxalate> sheet (updating columns labels to [HQ] and [Q-], respectively).

After this, the equilibrium calculation has been reduced to the problem of selecting a vector from the updated <TetraOxalate> sheet by implementing the proton condition (39).

Once the vector representing the pH-Equivalent solution has been found our problem is solved. In fact, the vector representing our initial solution (mySolutionVector) is readily obtained by discarding (from the vector representing the pH-Equivalent solution) the elements containing values for [HQ] and [Q-], which, obviously, have no physical significance.

From the above example, it should be apparent that we must use the described device of creating a pH-equivalent solution any time that a solution is actually a mixture of substances which transfer to the solution simultaneously more than one species belonging to the same Acid-Base group. Buffer solutions, as the tetraoxalate solution above, are the most frequently encountered solutions in which the introduction of a pH-Equivalent solution may be necessary.

4.3. Implementing the Proton Condition in mySolutionMatrix

In mySolutionMatrix, the row (vector) which represents our solution is the one which verifies the proton condition.

To identify this vector, we calculate, from concentrations in each row, the function which is defined as the difference between the left side member and the right side member of the proton condition. That is, we define the function according to equation (40):

(40)

in which [H+], , and must be interpreted as relative references to cells belonging to the same row in the Excel sheet exposing mySolutionMatrix.

To calculate we insert label <PrCvalue> in the first cell of the first free column of Excel sheet exposing mySolutionMatrix. Function is entered, following equation (40), in the cell of row 2 under label <PrCvalue> and then extended throughout the whole column <PrCvalue> (which is filled with numbers representing the function for each row of mySolutionMatrix).

In effect, the simple code necessary for evaluating is the only code to be entered in order to solve whatever problem.

The code (entered in row 2 under label <PrCvalue> created in mySolution sheet) is very simple. It has the general form:

<=A2 + (RI×CellRef)1 + (RI×CellRef)2 + ······

- C2 - (PI×CellRef)1 - (PI×CellRef)2 - ······>.

In this code CellRef stand for a relative reference to a cell of row 2 of mySolutionMatrix which contains either the concentration of a protons richer species (+ sign) or the concentration of a protons poorer species (- sign). Obviously, the number of terms of the type + (RI×CellRef)i and - (PI×CellRef)i to be entered is prescribed by the proton condition.

The code entered in row 2 under label <PrCvalue> is, then, extended up to row 282 so that this column becomes filled with numbers representing the calculated for each of the 281 row of mySolutionMatrix.

Figure 3. Suggested steps for calculating the pH and equilibrium concentrations of all species in a solution of acids and/or bases using the matrixGenerator

Hardly there will be in mySolutionMatrix a row which exactly satisfies the proton condition (this row should give). In general we will identify the vector we are looking for as the one that corresponds to the value of the function (either positive or negative) closest to zero. This is easily done by inspecting the contents of the <PrCvalue> column because function changes from positive to negative by increasing the pH so that the searched row is either the one with the last positive value or the one with the first negative value of the function. After it has been identified, the vector which represents our solution (mySolutionVector) can be marked inserting a coloured background and the values of pH and of the concentrations of all specie at equilibrium can be read. If one wishes to calculate pH with a precision of ± 0.025 pH units, it is possible to take the average value of pHs corresponding to row with the last positive value and the row with the first negative value of the function. In any case, the precision of the calculated results can be increased at will by decreasing the spacing between rows in matrixGenerator.

The full procedure of calculating pH and concentrations of all species at equilibrium in a solution of acids and/or bases can be synthesized in the five steps presented in Figure3. Eventually, the order of steps can be changed, if necessary or convenient.

The examples in the next section allow acquiring confidence in the application of the calculation technique presented in the previous sections.

It is strongly recommended to perform all operations described in the examples employing the matrixGenerator.xlsx Excel file.

5. Basic Examples

pKa values used in the following examples are at 25°C and zero ionic strength and are taken from [1].

Example1 → Find the pH and the equilibrium concentrations of all species in a 0.05 M solution of sodium diammonium phosphate (Na(NH4)2PO4).

Procedure → Strictly, the dissolution of Na(NH4)2PO4 transfers to the solution three Acid-Base groups: (Na+, NaOH), (NH4+, NH3) and (H3PO4, H2PO4-, HPO42-, PO43-). Scanning the analytical array, i.e., {0.05 M Na(NH4)2PO4}, we can make a number of conjectures.

First, the group (Na+, NaOH) can be ignored because it has been introduced as Na+. For the remaining, the straightest way of proceeding is to assume for the solution the Acid-Base active composition: {0.1 M NH4+ + 0.05 M PO43-}. By selecting NH4+ and PO43- as protons reference species, proton condition (41) is readily written using equation (24) and the following classification of species in the solution:

H3PO4 ≡ PrR3, H2PO4- ≡ PrR2, HPO42- ≡ PrR1, NH3 ≡ PrP1;

(41)

Now, to solve the problem we take a new Excel sheet renamed <Example1>. Then, in the matrixGenerator, we set the monoprotic acid group type concentration to 0.1 M and its pKa to 9.25. The triprotic acid group type concentration is set to 0.05 M and the following dissociation constants are entered: pKa1 = 2.15, pKa2 = 7.20, pKa3 =12.15.

After that, we copy columns with labels: pH, [H+], [OH-], [HA], [A-], [H3T], [H2T-], [HT2-], [T3-] and paste them as values in <Example1> sheet. Finally, we update labels according to the real nature of the species in the solution (HA corresponds to NH4+ and H3T to H3PO4).

The <Example1> sheet exposes now mySolutionMatrix. We label the first free column (column J) entering in cell J1 the label <PrCvalue>. In cell J2, on the basis of proton condition (41), we enter the following code:

CellJ2: < =B2+H2+2*G2+3*F2-C2-E2 >

and extend it up to cell J282.

Column with label <PrCvalue> is now explored to find the value closest to zero (positive or negative). This exploration will select row 187 of <Example1> sheet for which the value of the function is 3.61×10-4 M and occurs at pH = 9.25, which represents the calculated pH of the given solution.

Figure 4 is a graphical representation of the calculated as a function of pH, which can be obtained in the blink of an eye in <Example1> Excel sheet by selecting columns with labels <pH> and <PrCvalue> and inserting a dispersion plot with the standard Excel menu.

Figure 4. Plot for the 0.05 M Na(NH4)2PO4 solution (Example 1).

Finally, Row 187 of <Example1> sheet is coloured and the values of equilibrium concentrations in the 0.05 M Na(NH4)2PO4 solution are, finally, read (see Figure 5).

Figure 5. Particular of <Example1> Excel sheet with pH and equilibrium concentrations of species in a 0.05 M solution of sodium diammonium phosphate (Na(NH4)2PO4)

Example 2 → Find the pH and the equilibrium concentrations of all species in a solution 0.05 M of Mohr salt (which corresponds to the formula (NH4)2Fe(SO4)2·6H2O (MW = 392.14)). Assume that no Fe2+-NH3 complexes are formed.

Procedure → The solution data are collected in the following disaggregated analytical array (42):

(42)

from which it is clear that the dissolution of Mohr salt transfers to the solution the Acid-Base groups (NH4+, NH3), (H2SO4, HSO4−, SO42-) and (Fe2+, FeOH+, Fe(OH)2, Fe(OH)3−, Fe(OH)42−), at group concentrations, respectively, of 0.1 M, 0.1 M and 0.05 M.

The following dissociation constants (at 25 °C and zero ionic strength) are readily found in the literature [1]:

(NH4+, NH3)→ pKa1 = 9.25;

(H2SO4, HSO4-, SO42-) → pKa1 ≈ -5, pKa2 = 1.99;

(Fe2+, FeOH+, Fe(OH)2, Fe(OH)3-, Fe(OH)42-) → pKa1 = 9.5, pKa2 = 11.3, pKa3 = 11.19, pKa4 ≈ 14.0;

The proton condition is readily obtained by taking NH4+, SO42- and Fe2+ as protons reference species, from which choice the following classification of species in the solution ensues:

NH3 ≡ PrP1, HSO4- ≡ PrR1, H2SO4 ≡ PrR2, FeOH+ ≡ PrP1, Fe(OH)2 ≡ PrP2, Fe(OH)3- ≡ PrP3, Fe(OH)42- ≡ PrP4.

This gives proton condition (43):

(43)

From the given data, mySolutionMatrix is readily constructed in an Excel sheet renamed <Example2>.

This is done by entering in matrixGenerator the group concentrations and pKai given, respectively, for the monoprotic acid, diprotic acid and tetraprotic acid group types. Then columns with labels pH, [H⁺], [OH⁻], [HA], [A-], [H₂D], [HD⁻], [D²⁻], [H4F], [H3F⁻], [H2F²⁻], [HF³⁻], [F4⁻] are copied and pasted as values in the <Example2> sheet. Labels can be updated considering that HA ≡ NH4+, H2D ≡ H2SO4 and H4F ≡ Fe2+.

The function is calculated entering the following code under label <PrCvalue> in cell N2:

CellN2: <=B2+G2+2*F2-C2-E2-J2-2*K2-3*L2-4*M2 >.

The value closest to zero (-1.63·10-6) occurs at row 114 of <Example2> sheet corresponding to pH = 5.60, which represents the calculated pH of the solution.

Figure 6 shows a plot of as a function of pH, while Figure 7 is a particular of <Example2> Excel sheet from which equilibrium concentrations in the 0.05 M of Mohr salt can be read.

Figure 6. Plot for the 0.05 M (NH4)2Fe(SO4)2·6H2O solution (Example 2)
Figure 7. Particular of <Example2> Excel sheet with pH and equilibrium concentrations of species in a 0.05 M solution of Mohr salt.

Example 3 → Find the pH and the equilibrium concentrations of all species in a solution 0.1 M of (NH4)HF2 (Ammonium hydrogen difluoride (MW = 57.04 uma)).

Procedure → The solution composition, as given, indicates the following disaggregated analytical array (44):

(44)

From which it is clear that the two Acid-Base groups (NH4+, NH3) →pKa1 = 9.25 and (HF, F-) →pKa1 = 3.17 are transferred to the solution. According to array (44) group (NH4+, NH3) is transferred to the solution as the initial species NH4+; on the contrary, both species of the hydrofluoric acid Acid-Base group are simultaneously transferred to the solution and this fact makes array (44) unsuitable for writing the proton condition. However, if a concentration of 0.1 M of protons is transferred from NH4+ to F-, analytical array (44) is changed to array (44a):

(44a)

Array (44a) unambiguously indicates NH3 and HF as protons reference species, NH4+ as protons rich species and F- as protons poor species. Proton condition (45) is readily obtained:

(45)

MySolutionMatrix is readily constructed in an Excel sheet, renamed <Example3>, by first entering in matrixGenerator data for the monoprotic (NH4+, NH3) Acid-Base group; columns pH, [H+], [OH-], [HA], [A-] are copied and pasted as values in <Example 3> sheet. Labels HA ad A- are updated to NH4+ and NH3, respectively.

Figure 9. Particular of <Example3> Excel sheet with pH and equilibrium concentrations of species in a 0.1 M (NH4)HF2 solution

After this, we return to matrixGenerator and enter data for the Acid-Base group (HF, F-); columns [HA] and [A-] are copied and pasted as value in <Example3> sheet. Labels HA ad A- are updated to HF and F-, respectively.

<Example3> sheet now exposes the matrix representing solution described by array (441) to which it must be applied proton condition (45). For this, the following code is entered in cell H2 (under label <PrCvalue>) and extended up to cell H282:

CellH2: <=B2+D2-C2-G2 >

The value closest to zero is -2.82·10-3 which occurs at row 66 of <Example3> sheet corresponding to pH = 3.20, which represents the calculated pH of the solution.

Figure8 shows a plot of as a function of pH, while Figure9 is a particular of <Example3> Excel sheet from which equilibrium concentrations in the 0.1 M of (NH4)HF2 solution can be read.

Example 4 → Find the pH and the equilibrium concentrations of all species in a solution which has been prepared by dissolving to 1 litre a mixture of phosphate salts which contained 7.000 grams each of K3PO4 (MW: 212.27 uma), KH2PO4 (MW: 136.09 uma) and K2HPO4 (MW: 174.18 uma).

Procedure → The solution composition, as given, indicates the following analytical array (46):

(46)

From which it is clear that the two Acid-Base groups (H3PO4, H2PO4-, HPO42-, PO43-) and (K+, KOH) are transferred to the solution.

Array (46) is unsuitable for writing the proton condition because of its ambiguity with regard to the protons reference species for the phosphoric acid Acid-Base group.

If we redistribute protons by transferring a concentration of 0.0329 M of protons from KH2PO4 to K3PO4 we obtain the equivalent analytical array (46a):

(46a)

Array (46a) is less ambiguous than array (46) because PO43- has been eliminated as a possible protons reference species, but it is still not suitable for our purposes because it exposes species H2PO4-, HPO42- of the phosphoric acid Acid-Base group. Array (46a) is converted to the pH-Equivalent array (46b) by adding 0.0185 M of the fictitious RQ salt:

(46b)

By redistributing protons in array (46b), we obtain array (46c) from which ambiguities concerning proton reference species have been removed:

(46c)

By disregarding K+ and R+, array (46c) is converted to the final Acid-Base effective array:

(46d)

which exposes HQ and HPO42- as protons reference species. The following classification of species in solutions ensues:

H3PO4 ≡ PrR2, H2PO4- ≡ PrR1, PO43- ≡ PrP1, Q- ≡ PrP1.

With this classification the following proton condition (47) is readily derived from equation (24):

(47)

This is implemented in a matrix representing a solution containing Acid-Base groups (H3PO4, H2PO4-, HPO42-, PO43-) and (HQ, Q-), respectively, at group concentrations of 0.1244 M and 0.0185 M.

MySolutionMatrix is build in a sheet renamed <Example4>. This is done by entering in matrixGenerator the above concentrations for the groups in the solution and the following dissociation constants: (Phosphoric acid) → pKa1 = 2.15, pKa2 = 7.20, pKa3 =12.15; (HQ) → pKa = -10. Columns pH, [H+], [OH-], [HA], [A-], [H3T], [H2T-], [HT2-], [T3-] are copied from matrixGenerator and pasted as values in <Example4> sheet, which, after labels have been updated (HA represents HQ and H3T represents H3PO4), will expose the matrix representing solution described by array (464).

The following code for calculating function is entered in cell J2 (under label <PrCvalue>):

CellJ2: < =B2+G2+2*F2-C2-I2-E2>

The value closest to zero is 2.73·10-4 which occurs at row 161 of <Example4> sheet corresponding to pH = 7.95, which represents the calculated pH of the solution.

Figure 10 shows a plot of as a function of pH, while Figure 11 is a particular of <Example4> Excel sheet from which equilibrium concentrations in the solution containing 7.000 gram each of K3PO4, KH2PO4 and K2HPO4 can be read.

Figure 11. Particular of <Example4> Excel sheet with pH and equilibrium concentrations of species in the phosphate mixture of Example4.

Of course, the equilibrium concentration of K+ is identical to its analytical concentration, i.e., 0.23 M, and the concentrations of HQ and Q- are not significant.

Example5 → A commercial solution sold as <Tris-EDTA buffer solution> is declared to be: 10.0 mM Tris (= C(CH2OH)3NH2), 10.0 mM Tris hydrochloride (= C(CH2OH)3NH3Cl), 1.00 mM disodium EDTA (= Na2H2EDTA).

In this declaration (see Scheme2):

Tris indicates, the base of the Acid-Base group (HTris+, Tris) →pKa = 8.075;

Tris hydrochloride stands for HTrisCl;

disodium EDTA is the disodium salt of ethylenediaminetetraacetic acid, H4EDTA (→pKa1 = 1.70, pKa2 = 2.40, pKa3 = 5.95, pKa4 = 10.17).

Scheme 2. Structures of Tris, TrisHCl and etilendiaminotetraacetic acid (H4EDTA)

Find the pH and the equilibrium concentrations of all specie in the <Tris-EDTA buffer solution>.

Procedure → The declared concentration of 10 mM HTrisCl is clearly equivalent to {10 mM Tris + 10 mM HCl), so much so that the solution can be represented with the following analytical array (48):

(48)

Array (48) unambiguously indicates the following protons reference species: Tris, HCl, Na+ and H2EDTA2-. Acid-Base group (Na+, NaOH) can be ignored because it is transferred to the solution as Na+.

Then, the following classification of species in the solution ensues:

HTris+ ≡ PrR1, Cl- ≡ PrP1, H4EDTA ≡ PrR2, H3EDTA- ≡ PrR1, HEDTA3- ≡ PrP1, EDTA4- ≡ PrP2.

From this classification and equation (24) we obtain the following proton condition (49):

(49)

proton condition (49) is applied to the matrix representing a solution in which the (HTris+, Tris), (HCl, Cl-) and (H4EDTA, H3EDTA-, H2EDTA2-, HEDTA3-, EDTA4-) Acid-Base groups have, respectively, group concentrations of 0.02 M, 0.010 M and 0.001 M.

The matrix representing this solution is build in a sheet renamed <Example5> in two steps.

First, data for the (HCl, Cl-) Acid-Base group are entered (i.e., 0.010 M for the group concentration and pKa ≈ -7). Columns, pH, [H+], [OH-], [HA] and [A-] are copied and pasted as values in <Example5> sheet (labels HA and A- are updated, respectively, to HCl and Cl-).

Then data for the other two groups are entered and columns [HA], [A-], [H4F], [H3F-], [H2F2-], [HF3-], [F4-] are copied and pasted as values in <Example5> sheet (labels are updated considering that HA ≡ HTris+ and H4F ≡ H4EDTA).

<Example5> sheet now exposes the matrix representing the given solution, which is made of 11 columns.

Label <PrCvalue> is entered in cell M1; the following code, implementing proton condition (49), is entered in cell M2 and extended up to cell M282:

CellM2: <=B2+2*H2+I2+F2-C2-E2-K2-2*L2>

The value closest to zero is -1.375·10-4 which occurs at row 162 of <Example5> sheet corresponding to pH = 8.00, which represents the calculated pH of the solution.

Figure 12 shows a plot of as a function of pH, while Figure 13 is a particular of <Example5> Excel sheet from which equilibrium concentrations in the <Tris-EDTA> buffer can be read.

Figure 13. Particular of <Example5> Excel sheet with pH and equilibrium concentrations of species in the Tris-EDTA buffer of Example5.

Example 6 → An EDTA solution (i.e., ethylendiaminetetraacetic acid; see Scheme2; H4EDTA →pKa1 = 1.70, pKa2 = 2.40, pKa3 = 5.95, pKa4 = 10.17) was prepared by transferring 9.044 g of Na4EDTA·2H2O (PM = 452.23 uma) to 1.00 litre of solution.

Furthermore, evaluate the change in pH when to 1 litre of this solution are added 2.000 g of solid ethylendiaminetetraacetic acid (H4EDTA, MW = 292.24 uma).

Procedure → The first question is answered very easily considering that in the assigned solution have been dissolved (2.044/452.23) = 0.0200 moles of Na4EDTA·2H2O. The matrix representing the 0.0200 M Na4EDTA solution is readily constructed by disregarding Na+, and proton condition (50) is implemented:

(50)

Proton condition (50) is obtained by selecting EDTA4- as protons reference species and is applied to a matrix representing a solution in which the group concentration of the Acid-Base group (H4EDTA, H3EDTA-, H2EDTA2-, HEDTA3-, EDTA4-) is 0.02 M. We readily obtain pH = 11.20.

After the addition of (2/292.24) = 0.00684 moles of the pure H4EDTA acid, the solution is represented by the following array (51):

(51)

This needs to be disambiguated since apparently two constituents, i.e., H4EDTA and EDTA4- fit in the Acid-Base group (H4EDTA, H3EDTA-, H2EDTA2-, HEDTA3-, EDTA4-).

The most direct way of disambiguating analytical array (51) is through the pH-equivalent solution (51a):

(51a)

which is obtained from the initial solution by adding a concentration of 0.00684·4 = 0.02736 M of the fictitious salt RQ. In fact, by exchanging four protons from H4EDTA with R+ in RQ we obtain:

(51b)

In array (51b), R+ and Na+ are disregarded and calculations are performed on the basis of the analytical array (51c):

(51c)

EDTA4- and HQ are selected as protons reference species and proton condition (52) is readily obtained:

(52)

Matrix representation of solution (51c) is obtained by entering in matrixGenerator 0.02736 M and pKa = -10 for the monoprotic acid group type; then, 0.02684 M and pKa1 = 1.70, pKa2 = 2.40, pKa3 = 5.95, pKa4 = 10.17 are entered for the tetraprotic acid group type.

Columns pH, [H+], [OH-], [HA], [A-], [H4F], [H3F-], [H2F2-], [HF3-], [F4-] are copied and pasted as values in a new sheet renamed <Example6>. In <Example6> sheet, labels are updated considering that the model group (HA, A-) coincides with (HQ, Q-) and model group (H4F, H3F-, H2F2-, HF3-, F4-) coincides with (H4EDTA, H3EDTA-, H2EDTA2-, HEDTA3-, EDTA4-). Label <PrCvalue> is entered in cell K1 of <Example6> Excel sheet and the following code, which implements proton condition (52) is entered in cell K2:

CellK2: < =B2+4*F2+3*G2+2*H2+I2-C2-E2>

The value closest to zero is -4.67·10-6 which occurs at row 154 of <Example 6> sheet corresponding to pH = 7.60, which represents the calculated pH of the solution.

Figure 14 shows a plot of as a function of pH, while Figure 15 is a particular of <Example6> Excel sheet from which equilibrium concentrations in the 0.00684 M H4EDTA + 0.020 M Na4EDTA mixture can be read.

Finally the pH of the initial 0.020 M Na4EDTA solution decreases of 11.20 – 7.60 = 3.60 pH units upon addition of 2.000 g of solid H4EDTA.

Figure 14. Plot for the 0.00684 M H4EDTA + 0.020 M Na4EDTA mixture of Example 6.
Figure 15. Particular of <Example 6> Excel sheet with pH and equilibrium concentrations of species in the 0.00684 M H4EDTA + 0.020 M Na4EDTA mixture of Example 6.

Associated Content

<matrixGenerator.xlsx> MS Excel file.

References

[1]  Smith R. M., Martell A.E., Critical Stability Constants, Plenum Press: New York, 1967.
In article      
 
  • CiteULikeCiteULike
  • MendeleyMendeley
  • StumbleUponStumbleUpon
  • Add to DeliciousDelicious
  • FacebookFacebook
  • TwitterTwitter
  • LinkedInLinkedIn