47 CHEMICAL SCIENCES УДК 536.632 USING A VECTOR APPROACH TO BALANCE CHEMICAL EQUATIONS Kozub Pavlo, PhD (Technical Sciences), Associate Professor Kharkiv National University of Radio Electronics Kharkiv, Ukraine Yilmaz Nataliia, PhDS, scientist EPFL, the Swiss Federal Institute of Technology in Lausanne Lausanne, Switzerland Kozub Svetlana, PhD (Technical Sciences), Associate Professor Kharkiv National Medical University Syrova Ganna, Doctor of Pharmaceutical Sciences, Professor Kharkiv National Medical University Chalenko Natalya PhD (Pharmaceutical Sciences), senior teacher Kharkiv National Medical University Abstract: It is shown that the use of the vector approach allows us to clearly display chemical interactions and develop a reliable, universal, visual, simple and efficient universal algorithm for calculating stoichiometric coefficients for chemical reactions, which has no restrictions on the number of elements and the number of reagents. It is established that this algorithm allows obtaining a set of solutions in the form of a minimal set of linearly independent chemical equations. Examples of using the algorithm to calculate a system of balanced reaction equations for three chemical systems of different complexity are given. 48 Keywords: chemical reactions, equations, balancing, stoichiometric coefficients, vectors, calculation algorithm. Introduction The concept of a chemical reaction, a chemical equation, and its solution is one of the key points of modern chemistry. The search for stoichiometric coefficients is one of the first steps in solving any problem in chemical technology, chemicals utilization and disposal technology, environmental studies, biological and biochemical processes seems to be a fairly simple task from the point of view of mathematics [1]. Indeed, simple chemical equations can be balanced almost intuitively without the use of particularly sophisticated mathematical methods, but chemical equations for redox processes, for processes with ions, and in the presence of more than 4 reagents already require more complex calculation methods [2, 3]. Moreover, even they do not guarantee the correct or only solution. The task is even more complicated when there are more than 3 elements in the chemical system, which is a common phenomenon for any ecological system and conventional chemical technologies. For example, modeling possible reaction systems for a chemical warehouse or even a simple household chemical store that may occur in a fire requires the calculation of systems with at least 1000 chemical reagents, which in turn can lead to the formation of several tens of thousands of new chemicals. Today, this common chemical problem is reduced to solving a system of linear equations that are formed from the conditions of material balance. On the one hand, this allows the use of universal mathematical methods, but on the other hand, it leads to the neglect of simple chemical laws [4, 5]. Such material balance matrices, with a large number of reagents, become almost unsolvable because the material balance matrices become ill-conditioned and have a large number of solutions, or do not have any at all. This leads to the development of more and more complex matrix algorithms, but does not solve the 49 problem fundamentally. Methodology As we have shown earlier, vectors in the multidimensional space of chemical elements can clearly represent chemical interactions, and therefore can provide a reliable, versatile, visual, and simple tool for working with them [6-10]. Thus, graphically, the problem of balancing chemical reactions can be reduced to the problem of matching the endpoints of the sum of different sets of vectors in a multidimensional element space. As with a chemical reaction, each of these sets cannot have the same vectors, and their number can only be a positive number (for classical chemistry, it is a positive integer). This fundamentally distinguishes this approach from the traditional solution of systems of linear equations, which allow solutions with negative coefficients. The use of multidimensional vectors also leads to another important conclusion - the possibility of simplifying the solution when using projections and sections of space. An important feature of this approach is that the number of vectors is a non-negative integer, which leads to a finite number of solutions that are limited by the complexity of the chemical system. Thus, it is obvious that any projection of a general solution will also have a solution. That is why general solutions are those that have solutions in all projections (for all elements). Conversely, if there is no solution in at least one of the projections (for at least one element), then there is no solution for the general chemical system. Algorithm This approach allowed us to develop a simple but effective universal algorithm for solving chemical equations. 1. An initial set of reactions is given, including all compounds, and at least the number of compounds. 2. By the method of linear combination of equations, a set of reactions balanced by only one element is obtained. 50 3. Reactions that cannot be balanced are excluded from consideration. 4. Repeat steps 2 and 3 for the remaining elements. As a result, in the absence of solutions, there will be no balanced reactions at all. If there are several solutions, the number of reactions will be more than one. A set of primary reactions with only one reagent results in independent reactions, the combination of which gives the entire set of end products. From a mathematical point of view, the calculation algorithm can be described as a list of operations with vectors and matrices based on them: 1. Each compound of the reaction mixture is represented as a vector in a multidimensional element space  ieeeec ,,,, 321    i - number of elements in the reaction system; ei - number of element atoms in the compound. 2. A vector of reagents and reaction products involved in chemical interaction is formed   jccccs  ,,,, 321 j - number of compounds in the reaction system. 3. Specify the number of reagents and the number of reaction products in the form of vectors for each compound. If the corresponding compound is not in the list, its quantity is assumed to be zero.   jnnnnr ,,,, 321      jnnnnp ,,,, 321    4. From these two vectors, the reaction direction vector is formed, which is necessary to form the initial set of reactions prk   5. For the initial reaction, the non-zero value of the stoichiometric coefficients is set only for one of the reagents   jmno m  1,0,,0,,0  m - index of the reagent involved in the reaction. 6. Thus, a vector of initial reactions is formed with the values of stoichiometric 51 coefficients for each of the reagents   joooow ,,,, 321  7. Calculate the value of the material balance deviation for each of the initial reactions and for each of the elements   ilddddos mimmlmm  1,,,,, 31  m - reaction index in the general list of reactions; l - index of the item for which the deviation from the balance is calculated. 8. Starting from the first element, a deviation vector is created for each of the reactions, which allows you to select reactions balanced by this element or find coefficients for a new solution   jlylxllm ddddD ,,,,1  9. If there is a deviation from the balance ( 0xld ) the second reaction with a deviation from the balance, but with a different sign of deviation, is searched for and a new set of stoichiometric coefficients is calculated as the sum of reaction vectors. Such a sum automatically corresponds to a zero deviation of the material balance for a given element xlyylxz dodoo  10. After checking all the reactions for the possibility of balancing according to step 7, reactions with a non-zero balance value are deleted from the list of reactions and the material balance is calculated for the updated list of reactions for the next element (repeat steps 5-7). 11. As a result of the calculations, a list of balanced reactions remains. If a solution is not possible, no reactions are left in the list. The peculiarity of this algorithm is that it can be used for reactions of any dimension and obtain a set of possible solutions for complex reactions. Results Calculations of stoichiometrically possible chemical reactions for the most known and technically important chemical-technological processes are given below as examples of possibilities of this method. 52 NO reaction As a first example, we can consider a reaction system that is extremely important for industry and the environment, with only three starting reagents - nitrogen, oxygen, ozone and all possible stable nitrogen oxides.: N2, O2, O3  NO, N2O, NO2, N2O4, N2O3, N2O5 In chemical technology, this reaction system is the main one for nitric acid production. In the environment, it is responsible for the formation of nitrogen compounds in the atmosphere as a result of solar irradiation and atmospheric electric discharges. This system has only 2 elements and 9 compounds, and can be represented by 12 chemical reactions independent of each other. N2 + O2 = 2NO 2N2 + O2 = 2N2O N2 + 2O2 = 2 NO2 N2 + 2O2 = N2O4 2N2 + 3O2 = 2N2O3 2N2 + 5O2 = 2N2O5 3 N2 + 2O3 = 6NO 3N2 + O3 = 3N2O 3N2 + 4O3 = 6NO2 3N2 + 4O3 = 3N2O4 N2 + O3 = N2O3 3N2 + 5O3 = 3N2O5 The addition of another element, hydrogen, leads to the appearance of 6 more compounds, and the number of independent reactions almost doubles. Graphite oxidation reaction A more complex chemical system is created in the process of alkaline oxidation of graphite. It consists of three initial reactants and provides for the possible formation of 6 reaction products. The calculation of possible reactions in this system is one of the most difficult, since they are associated with redox reactions 53 NaNO3, C, NaOH  Na2CO3, N2, CO2, NaNO2, NO, H2O after calculations, we get 14 independent chemical equations, 10 of which involve all three initial reagents 2NaNO3 + C + 2NaOH = Na2CO3 + 2NaNO2 + H2O 3NaNO3 + 2C + 2NaOH = 2Na2CO3+ NaNO2 + 2NO + H2O 4NaNO3 + 2C + 2NaOH = Na2CO3 + CO2 + 5NaNO2 + H2O 4NaNO3 + 3C + 2NaOH = 3Na2CO3 + 4NO + H2O 4NaNO3 + 5C + 6NaOH = 5Na2CO3 + 2N2 + 3H2O 5NaNO3 + 4C + 6NaOH = 4Na2CO3 + N2 + 3H2O 6NaNO3 + 3C + 4NaOH = 2Na2CO3 + CO2 + 6NaNO2 + 2H2O 7NaNO3 + 4C + 6NaOH = 4Na2CO3 + 5NaNO2 + 2NO + 3H2O 8NaNO3 + 5C + 6NaOH = 5Na2CO3 + 4NaNO2 + 4NO + 3H2O 10NaNO3 + 5C + 4NaOH = 2Na2CO3 + 3CO2 + 10NaNO2 + 2H2O 2NaNO3 + C = CO2 + 2NaNO2 4NaNO3 + 3C = 2Na2CO3 + CO2 + 4NO 4NaNO3 + 5C = 2Na2CO3 + 2N2 + 3CO2 8NaNO3 + 5C = 2Na2CO3 + 3CO2 + 4NaNO2 + 4NO It should be noted that the resulting list of reactions is exhaustive for a given set of reagents, but it can be expanded by adding other compounds such as H2O2, CO, Na2O2, NO2, N2O, N2O4, N2O3, N2O5, etc. And without the proposed algorithm, the calculation of the reaction system becomes almost impossible. Gunpowder oxidation reaction Another example of calculations is the well-known process of burning of gunpowder, which has only 3 initial reactants. If we limit the number of reaction products to only three substances, KNO3, C, S  K2S, N2, CO2 then only one chemical equation is possible 2KNO3 + 3C + S = K2S + N2 + 3CO2 but taking into account the possibility of formation of reaction products with other degrees of oxidation of Sulfur, Nitrogen and Carbon, we can count on at least 9 54 additional substances KNO3, C, S  K2S, N2, CO2, CO, K2CO3, SO2, SO3, NO2, NO, KNO2, K2SO3, K2SO4 As a result, after calculations using the proposed algorithm, we find 86 possible chemical reactions between reagents, of which 25 include all the initial reagents. 2KNO3 + 3C + S = K2S + N2 + 3CO2 2KNO3 + 6C + S  K2S + N2 + 6CO 2KNO3 + C + S  K2S + CO2 + 2NO2 2KNO3 + 2C + S  K2S + 2CO2 + 2NO 2KNO3 + 2C + S  K2S + 2CO + 2NO2 2KNO3 + 4C + S  K2S + 4CO + 2NO 14KNO3 + 6C + S  K2S + N2 + 6K2CO3 + 12NO2 6KNO3 + 2C + S  K2S + 2K2CO3 + 6NO2 10KNO3 + 4C + S  K2S + 4K2CO3 + 8NO2 + 2NO 4KNO3 + 3C + 2S  2N2 + 3CO2 + 2K2SO3 2KNO3 + C + S  N2 + CO2 + K2SO4 4KNO3 + C + 2S  CO2 + CO + 4NO + 2K2SO3 3KNO3 + 3C + S  N2 + 3CO + K2SO3 2KNO3 + 2C + S  N2 + 2CO + K2SO4 2KNO3 + C + S  CO + 2NO + K2SO3 4KNO3 + 2C + 3S  2N2 + 2K2CO3 + 3SO2 4KNO3 + 2C + S  2K2CO3 + SO2 + 4NO 2KNO3 + C + S  N2 + K2CO3 + SO3 6KNO3 + 3C + S  3K2CO3 + SO3+ 6NO 8KNO3 + C + 3S  N2 + 4K2CO3 + 6NO2 + 3K2SO3 10KNO3 + 2C + 3S  2N2 + 2K2CO3 + 6NO2 + 3K2SO4 8KNO3 + 3C + S  N2 + 3K2CO3 + 6NO2 + K2SO3 6KNO3 + 2C + S  N2 + 2K2CO3 + 4NO2 + K2SO4 55 4KNO3 + C + S  K2CO3 + 2NO2 + 2NO + K2SO3 6KNO3 + 2C + S  2K2CO3 + 2NO2 + 4NO + K2SO4 It should be noted that the analysis of the reactions shows that at some ratios of reagents, the specific amount of gaseous products can be greater than the main reaction and this result cannot be achieved without the creation of such a complete reaction system. Conclusions Thus, based on the vector approach to describing chemical systems, an algorithm for calculating stoichiometric coefficients for chemical reactions was developed, which has no size restrictions in terms of the number of elements and the number of reagents. It is established that this algorithm allows obtaining a set of solutions in the form of a minimal set of linearly independent chemical equations. Examples of using the algorithm for three chemical systems of different complexity are given. REFERENCES 1. Zeggeren, V. F.; Storey, S. H. The Computation of Chemical Equlibria, Cambridge Univ. Press, London,1970 2. W. L. Yarroch, Student understanding of chemical equation balancing, J. Res. Sci. Teach., 22 (1985), pp. 449-459. 3. Smith, W. R.; Missen, R. W. Chemical Reaction Equilibrium Analysis: Theory and Algorithms, Wiley, New York 1982. 4. Gabriel, C.I. and Onwuka, G.I. (2015) Balancing of Chemical Equations Using Matrix Algebra/ Journal of Natural Sciences Research , 3, pp.29-36. 5. Risteski, I. B., 2009. "A new singular matrix method for balancing chemical equations and their stability." Journal of the Chinese Chemical Society, vol. 56, pp. 65-79. 6. Thorne, Lawrence R. (2010). "An Innovative Approach to Balancing Chemical-Reaction Equations: A Simplified Matrix-Inversion Technique for Determining the Matrix Null Space". Chem. Educator. 15: 304–308. arXiv:1110.4321 7. Risteski, I.B. (2012). A new algebra for balancing special chemical https://wp-en.wikideck.com/ArXiv_(identifier) https://arxiv.org/abs/1110.4321 56 reactions, Chemistry: Bulg. J. Sci. Educ., 21, 223-234 8. Використання векторів для проведення та наглядного представлення стехіометричних розрахунків у хімії/ Козуб П. А., Козуб С. М., Бердо Р. В., Печерська В. І., Романов М. Д. / Актуальні проблеми сучасної хімії: Матеріали Всеукраїнської науково-практичної конференції студентів, аспірантів та молодих науковців , 20-22 квітня 2017р. – Миколаїв: НУК, 2017. - 41-43 с. 9. Козуб П.A., Козуб C.M., Присяжний О.В. / Вдосконалення стехіометричних методів аналізу складних хімічних систем // Science and society. Proceedings of the 9th International conference. Accent Graphics Communications & Publishing. Hamilton, Canada. 2019. Pp. 1095–1105. 10. P. Kozub, V. Lukianova, S. Kozub / Vector approach for modeling, research and optimization of complex chemical systems // Abstracts of international conference of natural sciences and technologies (ICONAT-2021). Turkish Republic of Northern Cyprus. 18-20 AUGUST 2021. P. 28.