Why can't I balance this reaction algebraically?
Here's how to solve the system in python:



&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; 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
&gt;&gt;&gt; rhs = np.array([0, 0, 0, 0, 1])  # last number is assumed val of a
&gt;&gt;&gt; np.linalg.solve(stoich_mat, rhs)
array([ 1.        ,  2.66666667,  1.        ,  0.66666667,  1.33333333])


Thus this solution says:

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

Multiplying through by 3:

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


$$\ce{3 Cu   +   8 HNO3   -&gt;  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.