# Solving a system of equations in a non-square matrix

Mrs Brown has pet cats, pet parrots, pet fish and pet rocks. Each pet rock has three eyes, no legs and no tail. The other pets have as many of these features as you would expect. Let the number of cats, parrots, fish and rocks be given by c, p, f and r respectively.

(a) Suppose N = [ c p f r ]^T. Find the matrix M so that MN is the matrix whose entries are: the total number of eyes, legs and tails of Mrs Brown’s pets.

(b) Together, Mrs Brown’s pets have 25 eyes, 14 legs and 8 tails. How many pets of each type might she have? Explain your answer carefully.

I'm not sure if part b needs me to state just the general expressions or find actual solutions because it seems to me that the system has infinitely many solutions, i.e. total number of eyes ( 2c + 2p + 2f + 3r = 25 ), legs ( 4c + 2p = 14 ) and tails ( c + p + f = 8 ).

-

There is an implicit side condition that the numbers of the various kinds of pet are all non-negative integers.

Since there are $25$ eyes, there cannot be more than $12$ pets. In particular, there cannot be infinitely many solutions.

Added: As you mentioned, we arrive at the equations $2c+2p+2f+3r=25$, $4c+2p=14$, and $c+p+f=8$.

It seems reasonable to start with the simplest equation, $4c+2p=14$, which we rewrite as $2c+p=7$. Clearly $p$ must be odd. We have the possibilities (i) $p=1$, $c=3$; (ii) $p=3$, $c=2$; (iii) $p=5$, $c=1$; (iv) $p=7$, $c=0$.

In case (i), from the equation $c+p+f=8$, we get $f=4$, and then from $2c+2p+2f+3r=25$ we get $r=3$. Indeed in all cases we must have $r=3$. For since $c+p+f=8$, we have $2c+2p+2f=16$, and therefore $3r=25-(2c+2p+2f)=9$.

Cases (ii), (iii), and (iv) are dealt with similarly.

We could also use matrix row reduction procedures to get at the solutions.

-
Thanks. So, c + p + f + r = 12? I still can't seem to find a solution to the system –  Roxana Sep 18 '12 at 1:24
@Roxana: All I wrote is that the total is $\le 12$. This was in order to say that there cannot be infiniely many solutions. Since everybody but rocks has $2$ eyes, the number of rocks must be odd. do you want me to check whether there is a solution? –  André Nicolas Sep 18 '12 at 1:28
I don't think the system has a solution but I was told the opposite, so I'm not sure how to go about answering part b. –  Roxana Sep 18 '12 at 1:38
I added a part of the calculations to the post. Hope the addition is clear enough. Would do matrix row reduction, but it is not much fun to typeset matrices. If you want to do it, it is the same as usual except that it is best to keep entries integers. And you are right about the $4$! –  André Nicolas Sep 18 '12 at 2:32
The explanation was very helpful. My apologies, I hadn't refreshed the page so didn't see it prior to replying. Thank you so much for all your help! –  Roxana Sep 18 '12 at 2:40