Let’s look at the simple chemical equation for creating water from hydrogen and oxygen.
\begin{equation*}
\alpha H_2 + \beta O_2 \rightarrow \gamma H_2O
\end{equation*}
We want to know how many molecules of each type are needed to go into the reaction and how many will come out. Note that the coefficents in this setting must be positive integers since we cannot have a fraction of a molecule.
If we consider the number of hydrogen atoms in the reaction, we get
\begin{equation*}
2\alpha = 2 \gamma
\end{equation*}
If we consider the number of oxygen atoms in the reaction, we get
\begin{equation*}
2\beta = \gamma
\end{equation*}
Thus we get the following system
\begin{equation*}
\begin{array}{cccc}
2\alpha \amp \amp -2\gamma \amp =0 \\
\amp 2 \beta \amp -\gamma \amp=0
\end{array}
\end{equation*}
which has augmented form
\begin{equation*}
\begin{bmatrix}
2\amp 0\amp -2\amp 0 \\
0\amp 2 \amp -1 \amp0
\end{bmatrix}
\end{equation*}
which can be reduced to
\begin{equation*}
\begin{bmatrix}
1\amp 0\amp -1\amp 0 \\
0\amp 1 \amp -1/2 \amp0
\end{bmatrix}
\end{equation*}
Notice that there is NOT a unique solution to system of equations, but rather we can have solutions of the form
\begin{equation*}
\begin{array}{cc}
\alpha \amp= \gamma \\
\beta \amp= \frac{1}{2}\gamma \\
\gamma \amp=\gamma (free)
\end{array}
\end{equation*}
Therefore, the smallest integer solution is when \(\gamma =2\text{,}\) which gives the following chemical reaction
\begin{equation*}
2 H_2 + O_2 \rightarrow 2 H_2O
\end{equation*}