why is the derivative of a number 0 while the derivative of $x$ is 1?
For a constant, let $f(x) = c$, where $c$ is a constant. Then we have that by the definition of a derivative that: $$ f'(x) = \lim_{h \to 0} \dfrac{f(x+h) - f(x)}{h} = \lim_{h \to 0} \; \dfrac{c - c}{h} = \lim_{h \to 0} \; \dfrac{0}{h} = \lim_{h \to 0} \; 0 = 0 $$ and for $f(x) = x$ we have that: $$ f'(x) = \lim_{h \to 0} \dfrac{f(x+h) - f(x)}{h} = \lim_{h \to 0}\dfrac{x+h-x}{h} = \lim_{h \to 0} \; 1 = 1. $$