Why do we invert then multiply when dividing fractions? I have looked up various sites online. They only explain it in a very basic arithmetic way. Would someone explain to me why is $\displaystyle\frac{x}{\frac{1}{2}}$ is $\displaystyle\frac{2x}{1}$?

$\frac{x}{\frac{1}{2}}=\frac{x}{\frac{1}{2}}\cdot1=\frac{x}{\frac{1}{2}}\cdot\frac{2}{2}=\frac{x\cdot 2}{\frac{1}{2}\cdot2}=\frac{2x}{1}$
Generally, 
$\frac{a}{\frac{b}{c}}=\frac{a}{\frac{b}{c}}\cdot\frac{c}{c}=\frac{ac}{b}=a\cdot\frac{c}{b}$
