Suppose we start with 1 chicken and 0 eggs. The output will be 1 chicken and 12 eggs.
Suppose we start with 1 chicken and 4 eggs. The output will be 5 chickens (the original plus 4 hatched from the eggs) and 0 eggs.
The input and output matrices are
\[I=\left( \begin{array}{cc} 1 & 0 \\ 1 & 4 \end{array} \right), \: O=\left( \begin{array}{cc} 1 & 12 \\ 5 & 0 \end{array} \right)\]
.Let
\[x_1\]
be the number of laying chickens and let \[x_2\]
be the number of hatching chickens. Hence \[(x_1, x_2)\left( \begin{array}{cc} 1 & 0 \\ 1 & 4 \end{array} \right)=(x_1+x_2, 4x_2) \]
. There are now \[x_1+x_2\]
chickens and \[4x_2\]
eggs ready for hatching.Suppose we are told that we have 3 chickens and 8 eggs ready for hatching. Then
\[(x_1,x_2)\left( \begin{array}{cc} 1 & 0 \\ 1 & 4 \end{array} \right)=(3,8)\]
.Hence
\[(x_1,x_2)=(3,8){\left( \begin{array}{cc} 1 & 0 \\ 1 & 4 \end{array} \right)}^{-1}=(3,8){\left( \begin{array}{cc} 1 & 0 \\ -1/4 & 1/4 \end{array} \right)}=(1,2)\]
.Then 1 chicken is used for laying eggs and 2 chickens used for hatching.
\[(1, 2)\left( \begin{array}{cc} 1 & 12 \\ 5 & 4 \end{array} \right)=(11, 12) \]
.The farmer now has 11 chickens and 12 eggs.