100 coins made up of pennies, dimes and quarters worth $5.00 I'm currently working through the book 'Elementary Number Theory' by Underwood Dudley, and I came across an example of seeing whether or not we can have 100 cents, dimes and quarters be worth exactly $5.00.
Before I begin, I know the above task is impossible, but I want to know the logic behind the steps we took to arrive at that conclusion.
In the example we derived 2 equations, 
$c+d+q = 100$ and $c+10d+25q=500$
Which was relatively straightforward. But what I have trouble with is the following: 
When we subtract the 1st equation from the 2nd, we get $9d+24q=400$, which I know is to cancel out the c, but why?
The 2 values are of different types, the first equation deals with the number of coins, the second deals with the number of cents, if we subtract the 2 equations, then aren't we subtracting coins from cents, which shouldn't be possible? 
Then the example goes to show that it's not possible to have exactly 5 dollars with 100 coins comprised pennies, dimes, etc.. by applying a previously defined lemma on the equation $9d+24q=400$, which is out of the scope of this question, so what I'm after is:
Is there a way to visualize what we're doing to the equations in terms of the objects in this question? (coins, pennies, etc...)? I just want an intuitive understanding of what we're doing here. 
I've tried to visualize the 2 equations as scales that we need to balance, but I can't quite fit my model into this question as the scales differ in units of measurement (coins vs pennies).
 A: One point of view is, once you have abstracted the "real-world" quantities (number of coins, number of cents) into equations with named variables, you can go at it with algebra and never mind what the next equation "means" in "reality."
You may have to take this view some day for some problem.
For this problem, in the equation $9d+24q=400,$ you know that every coin contributes at least one cent to the total value; the $9$ represents the number of extra cents that each dime contributes, and the $24$ represents the number of extra cents that each quarter contributes.
If the $100$ coins were all pennies we would be $400$ cents short of five dollars, so the $d$ dimes and $q$ quarters need to contribute a total of $400$ "extra" cents:
$$9d+24q=400.$$
A: The variables $c,d$ and $q$ are unitless. Their domain is $\{0,1,2, \dots\}$


*

*The number of pennies is $c$ coin.

*The number of dimes is $d$ coin.

*The number of quarters is $q$ coin.


$$c \ \text{coin} + d \ \text{coin} + q \ \text{coin} = 100 \ \text{coin}
  \implies c + d + q = 100$$


*

*The value of $c$ pennies is 
$c \ \text{coin} \times \dfrac{1 \ \text{cent}}{\text{coin}} 
    = c \ \text{cent}$

*The value of $d \ $ dimes is 
$d \ \text{coin} \times \dfrac{10 \ \text{cent}}{\text{coin}} 
    = 10d \ \text{cent}$

*The value of $q \ $ quarters is 
$q \ \text{coin} \times \dfrac{25 \ \text{cent}}{\text{coin}} 
    = 25q \ \text{cent}$
$$c \ \text{cent} + 10d \ \text{cent} + 25q \ \text{cent} = 500 \ \text{cent}
  \implies c + 10d + 25q = 500$$
A: The logic is this:


*

*$c+d+q=100$ represents number of coins

*$c+10d+25q=500$ represents number of coins, weighted by number of cents each is worth (not just number of cents).


Therefore they are consistent and can be subtracted. 
A: First, we display the equations as a matrix:
$$ \left[
\begin{array}{ccc|c}
  1&1&1&100\\
  1&10&25&500\\
  0&0&0&0
\end{array}
\right] $$
After some work, we arrive at the following canonical matrix:
$$ \left[
\begin{array}{ccc|c}
  1&1&1&100\\
  0&1&\frac{24}{9}&\frac{400}{9}\\
  0&0&0&0
\end{array}
\right] $$
The number of variables, n, is equal to 3, and note that $rank(A)=rank(A|B)$ - so on paper, this set of equations is supposed to have an infinite amount of solutions, which is given by:
$$
    \begin{pmatrix}
    \frac{10}{9} \\
    -\frac{24}{9} \\
    1 \\
    \end{pmatrix}t+
\begin{pmatrix}
    \frac{500}{9} \\
    \frac{400}{9} \\
    0 \\
    \end{pmatrix}
$$
Now, this is true for any $t$, but from the question, $t$ has to be a natural number!
Next, from the second row of the solution, we get that $-24t+400\geqslant0$ (the number of dimes can't be negative), and after a simplification: $t\leqslant 16\frac{2}{3}$, which means that $0\leqslant t\leqslant16$.
Now, a quick check for all values of t which are natural numbers, we find no possible value which gives us a natural number (which is supposed to be d, the number of dimes). 
Thus we finally conclude that there is no solution to this question.
A: One way to visualize things is to imagine replacing each dime with a stack of ten pennies and each quarter with a stack of twenty-five pennies.  When you subtract the equation $c+d+q=100$ from $c+10d+25q=500$ to get $9d+24q=400$, what you are doing in effect is to remove one penny from each stack, where $q$ of the stacks started with $25$ pennies, $d$ started with $10$ pennies, and $c$ of the stacks consisted of a single penny.
(Note, the impossibility resides in the fact that $9d+24q$ is divisible by $3$ whereas $400$ is not.)
