$$\ce{aCu + bHNO3 -> cCu(NO3)2 + dNO + eH2O}$$ (Source)

I calculated: \begin{align} a &= c &(\ce{Cu})\\ b &= 2e &(\ce{H})\\ b &= 2c + d &(\ce{N})\\ 3b &= 6c + d + e &(\ce{O}) \end{align}

And I tried substituting $a= 1$, but it couldn't solve the whole equation. How can I solve this algebraically?

  • 4
    $\begingroup$ $3 \ce{Cu} + 8 \ce{HNO_3} \rightarrow 3 \ce{Cu(NO_3)_2} + 2 \ce{NO} + 4 \ce{H_2O}$ is the balanced equation, found by accounting for electron transfer. $\endgroup$
    – TAR86
    Jan 21 '17 at 19:56
  • $\begingroup$ @TAR86 I want to know how to find that using equations. $\endgroup$
    – MCCCS
    Jan 21 '17 at 20:01
  • 1
    $\begingroup$ You'd never solve it without some assumptions. See, you have 4 equations and 5 variables. Essentially, this means you have infinitely many solutions. $\endgroup$ Jan 21 '17 at 20:03
  • $\begingroup$ @IvanNeretin I tried to assume numbers, but every time one of the equations gives error. $\endgroup$
    – MCCCS
    Jan 21 '17 at 20:09
  • 4
    $\begingroup$ Wolfram alpha finds: $b = \frac{8a}{3}, d = \frac{2a}{3}, e = \frac{4a}{3}$. Plug in $a=3$ to get whole numbers. $\endgroup$
    – TAR86
    Jan 21 '17 at 20:12

Given the reaction $\ce{a Cu + b HNO3 -> c Cu(NO3)2 + d NO + e H2O}$, we can set up four equations:

$$\begin{align} a &= c & &\text{(for Cu)} \tag{1} \\ b &= 2e & &\text{(for H)} \tag{2} \\ b &= 2c+d & &\text{(for N)} \tag{3} \\ 3b &= 6c+d+e & &\text{(for O)} \tag{4} \end{align}$$

Substituting equation $(1)$ into the rest, we get

$$\begin{align} b &= 2e & &\text{(for H)} \tag{2*} \\ b &= 2a+d & &\text{(for N)} \tag{3*} \\ 3b &= 6a+d+e & &\text{(for O)} \tag{4*} \end{align}$$

Substituting equation $(2^*)$ into equations $(3^*)$ and $(4^*)$, we have

$$\begin{align} 2e &= 2a+d & &\text{(for N)} \tag{3**} \\ 6e &= 6a+d+e & &\text{(for O)} \tag{4**} \end{align}$$

We can now multiply equation $(3^{**})$ by $3$ and subtract that from equation $(4^{**})$, which leaves us with $0 = -2d+e$. Therefore,

$$d = \frac{1}{2}e \tag{5}$$

Now, we try to express the constants $a,b,c,d$ in terms of $e$. Substituting equation $(5)$ back into equation $(3^{**})$, we find that

$$\begin{align} 2e &= 2a + \frac{1}{2}e \\ a &= \frac{3}{4}e \tag{6} \end{align}$$

and since $a = c$ (equation $(1)$), we also find that

$$c = \frac{3}{4}e \tag{7}$$

So, using equations $(6)$, $(2)$, $(7)$, and $(5)$, we can now rewrite the reaction as:

$$\ce{$\frac{3}{4}e$ Cu + $2e$ HNO3 -> $\frac{3}{4}e$ Cu(NO3)2 + $\frac{1}{2}e$ NO + e H2O} \tag{8}$$

Clear the fractional exponents by multiplying by 4:

$$\ce{$3e$ Cu + $8e$ HNO3 -> $3e$ Cu(NO3)2 + $2e$ NO + $4e$ H2O} \tag{9}$$

Now $e$ can be any positive rational number ( such as an integer $1,2,3,4,\cdots,n$ or a fraction such as 1/2 or 3/4) and for a "balanced" chemical equation, we divide by the greatest common factor of all the integer factors, thus 1 is the correct value to use. Thus the balanced equation is:

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4 H2O} \tag{10}$$

Note that if the equation had been something like
$$\ce{$6e$ Cu + $16e$ HNO3 -> $6e$ Cu(NO3)2 + $4e$ NO + $8e$ H2O} \tag{11}$$
then $e$ would have been 1/2 since all the species in the equation have a factor of 2 in common. For a "balanced" chemical equation integer values where the gcd is 1 are desired.

As Paul Harvey used to say here is "the rest of the story..."

The actual chemical reaction is:

$$\ce{a Cu + b HNO3 -> c Cu(NO3)2 + dNO + eNO2 + fH2O}$$

and this reaction doesn't have any unique solution.

In weak nitric acid the favored reaction is:

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4H2O}$$

but in strong nitric acid the favored reaction is:

$$\ce{ Cu + 4 HNO3 -> Cu(NO3)2 + 2 NO2 + 2H2O}$$

  • 2
    $\begingroup$ This is a very good step-by-step walkthrough on how to solve a system of linear equations, but I must complain about one line. There is no constraint that $e$ is a positive integer, it can be any real number. If $e$ were to be $\pi^2$, the equation is still as balanced as it would be if $e$ were $1$. The choice of setting $e = 1$ is simply one of simplicity - nothing more than that. $\endgroup$
    – orthocresol
    Aug 31 '17 at 18:08
  • $\begingroup$ @orthocresol - I guess we'll have to agree to disagree. Having $\pi^2$ atoms of Cu makes no sense in what is traditionally thought of "balancing" equations. The mineral olivine on the other hand with the formula formula $\ce{(Mg^{2+}, Fe^{2+})2SiO4}$ can have any ratio of formula $\ce{Mg^{2+}}$ to $\ce{Fe^{2+}}$ and almost certainly would not have definite integer values for $\ce{Mg^{2+}}$, $\ce{Fe^{2+}}$ and $\ce{SiO_4^{2-}}$. $\endgroup$
    – MaxW
    Sep 1 '17 at 4:13
  • 1
    $\begingroup$ Ok, edited the answer a bit to make the part about $e$ better. $e$ could also be a rational fraction like 1/2 or 4/3. $\pi^2$ however makes no sense to me in a "balanced chemical equation." $\endgroup$
    – MaxW
    Sep 1 '17 at 17:54

Here's how to solve the system in python:

>>> import numpy as np
>>> stoich_mat = np.array([[-1, 0, 1, 0, 0],  # copper balance
                           [0, -1, 0, 0, 2],  # hydrogen
                           [0, -1, 2, 1, 0],  # nitrogen
                           [0, -3, 6, 1, 1],  # oxygen
                           [1, 0, 0, 0, 0]])  # impose constraint that a == val
>>> rhs = np.array([0, 0, 0, 0, 1])  # last number is assumed val of a
>>> np.linalg.solve(stoich_mat, rhs)
array([ 1.        ,  2.66666667,  1.        ,  0.66666667,  1.33333333])

Thus this solution says:

$$\ce{Cu + 2.67 HNO3 -> Cu(NO3)2 + 0.67 NO + 1.33 H2O}$$

Multiplying through by 3:

>>> rhs_times_3 = np.array([0, 0, 0, 0, 3])
>>> np.linalg.solve(stoich_mat, rhs_times_3)
array([ 3.,  8.,  3.,  2.,  4.])

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4 H2O}$$

If your question is how computers (or people) can solve systems of linear equations, you can read up on Gaussian elimination and related techniques.

  • $\begingroup$ Well, I'm not sure about using python to solve stoichiometry problems. Could/Would anyone do that for a chemistry test now using a smartphone or some other computer device? (Being an old coot I still have a flip-phone.) I just can't imagine reverting to programming for a chemistry test. $\endgroup$
    – MaxW
    Jan 22 '17 at 7:04
  • 3
    $\begingroup$ @MaxW FWIW You could use python or a number of other languages on a smart phone using an online service like repl.it, but I don't think its very practical. More pragmatically, pulling up Wolfram Alpha on your phone is a pretty easy thing to do, and I personally have a TI-89 app on mine that will make quick work of a system of linear equations $\endgroup$
    – chiliNUT
    Jan 22 '17 at 8:17
  • 4
    $\begingroup$ The point isn't Python per SE, but to show how to set up problems like this for solution using linear algebra and matrices. These days, I'm not sure its even fair to call the act of using a computer to solve a matrix equation "programming". $\endgroup$
    – Curt F.
    Jan 22 '17 at 11:18
  • 1
    $\begingroup$ Using SymPy instead of NumPy, from sympy import *; Matrix([[-1,0,1,0,0,0],[0,-1,0,0,2,0],[0,-1,2,1,0,0],[0,-3,6,1,1,0],[1,0,0,0,0,1]]).rref() produces (Matrix([ [1, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 8/3], [0, 0, 1, 0, 0, 1], [0, 0, 0, 1, 0, 2/3], [0, 0, 0, 0, 1, 4/3]]), [0, 1, 2, 3, 4]). $\endgroup$ Jan 22 '17 at 17:29

You seem to have had the right idea of fixing the scale by arbitrarily choosing the value of one coefficient, and then solving for the rest. Apparently, you just got stuck at some point, presumably either because you couldn't solve for $b$ just with simple substitutions, or because your initial choice of $a = 1$ gave you fractional values for the other coefficients that you didn't know how to deal with.

If you plug $a = 1$ into your original equations, you'll immediately get $c = 1$, and by substituting that into the other equations, you're left with:

\begin{aligned} b & = 2e, \\ b & = 2+d, \text{ and} \\ 3b & = 6+d+e. \end{aligned}

One way to solve that remaining set of equations is to first subtract the second one from the last one, to get: $$3b - b = (6+d+e)-(2+d) \implies 2b = 4+e,$$ and then substitute in the first one to get: $$2(2e) = 4+e \implies 4e = 4 + e.$$ Subtracting $e$ from both sides then gives you $3e = 4$, which you can divide by 3 to get $e = \frac43$.

Once you have a numerical value for $e$, even if it's a fraction, you can then substitute that back into the first equation above to get $b = 2\cdot\frac43 = \frac83$, which you can then plug into the second one to get $\frac83 = 2 + d$, and then subtract 2 from both sides to get $d = \frac83-2 = \frac83 - \frac63 = \frac23$.

Now we have a solution $(a=1, b=\frac83, c=1, d=\frac23, e=\frac43)$, but it still contains fractional values that we'd like to get rid of. The way to fix that, however, is simple: just multiply all the values by their least common denominator, 3, to get $(a=3, b=8, c=3, d=2, e=4)$.

The reason that works is because your original system of linear equations was, by construction, homogeneous, i.e. every term in every equation contained exactly one of the coefficients $a$, $b$, $c$, $d$ and $e$. Thus, multiplying all the coefficients by the same scaling factor multiplies every term in the equations by the same amount, and thus turns any valid solution into another equally valid one.

Such rescaling does, in fact, have a reasonable physical interpretation: if we have $n$ instances of the reaction going on at the same time, then the combined reaction will obviously consume $n$ times as many of each reactant and produce $n$ times as many of each product. Allowing $n$ to take on fractional values does require a bit more of a mathematical leap of imagination, but we may e.g. interpret the fractionally scaled reaction as describing just a fraction of the original equation — which may or may not be chemically meaningful, depending on whether all the scaled coefficients work out to whole numbers of molecules, but which nonetheless correctly describes the proportions of reactants consumed and products yielded.

Of course, you could've also arrived at the appropriately scaled solution directly, if you had happened to start with the initial guess $a = 3$ instead of $a = 1$.

Indeed, the fact that you didn't need to make any further arbitrary choices during the solution, after this initial choice of scale, proves that all the possible solutions to this homogeneous system of linear equations are simply scalar multiples of each other. On the other hand, if you'd added a $+\ce{f NO2}$ term to the products of your reaction (as MaxW suggests in their answer, for extra realism), then you would've had to make an arbitrary choice about the proportion of $\ce{NO}$ and $\ce{NO2}$ products at some point during the solution (or, alternatively, leave it unspecified, leaving you with some non-numeric factors in your result), reflecting the fact that the solution space of this extended system of equations is multidimensional, i.e. has more than one degree of freedom, and that this extended reaction can thus yield varying proportions of its products depending on the conditions under which it occurs.


You have five variables but only four equations.

Algebra tells you that this is not a fully defined set of equations and that there are infinitely many possible solutions. For five variables you would need five equations.

However, a fifth constraint can be included by aiming for the smallest possible integer-only solution.

  • 2
    $\begingroup$ The missing equation is the scale, which, for any homogeneous linear system with non-trivial solutions, may be chosen arbitrarily. After all, if $(a,b,c,d,e)$ is a solution, then so is $(ka,kb,kc,kd,ke)$ for any $k$. Generally, we'd like to pick the smallest scaling factor that makes all the coefficients into positive integers (or, at least, into non-negative integers that are not all zero). The OP tried to do this by fixing $a=1$; unfortunately, that choice fails to yield integer values for the other coefficients. $\endgroup$ Jan 22 '17 at 5:39
  • 1
    $\begingroup$ 5 variables / 4 equations - that simply isn't true. The reaction: $$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4H2O}$$ does have a unique solution. A fifth condition is that the gcd of all the coefficients is removed to yield the smallest set of integers possible. $\endgroup$
    – MaxW
    Jan 22 '17 at 7:09
  • 1
    $\begingroup$ @MaxW it absolutely is true. There are 4 elements in the equation that are balanced. I'm not sure what you mean by GCD (greatest common denominator?), but the solution that you give is not necessarily unique. My answer gives a solution with non-integer coefficients, for example. $\endgroup$
    – Curt F.
    Jan 22 '17 at 11:24
  • $\begingroup$ @IlmariKaronen Yes, that was what I was implying for infinitely many solutions. $\endgroup$
    – Jan
    Jan 22 '17 at 11:50
  • 5
    $\begingroup$ @MaxW I was speaking from a pure algebraic point of view. Including the constraint of ‘lowest possible integer coefficients’ does indeed generate a fifth equation that can be used. $\endgroup$
    – Jan
    Jan 22 '17 at 11:51

Just for fun suppose we take the element balance equations and multiply each of them by the coefficient indicated below:

Copper: $a=c$, $×0$

Hydrogen: $b=2e$, $×1$

Nitrogen: $b=2c+d$, $×5$

Oxygen: $3b=6c+d+e$, $×(-2)$

Add up that linear combination:


So $c/d=3/2$. Assign values of the copper nitrate and nitric oxide coefficients accordingly and the rest of the system easily yields.

Hey wait, have we not seen that ratio before? It's the ratio we get for those two coefficients based on the standard redox method. When you use the redox method, you are using oxidation states as a tool to find a linear combination that simplifies the solution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.