Why does dimensional analysis work? I need a elementary reason I understand this is a very elementary question, but I haven't been able to come up with any elementary reason why it should work.
Also, why should quantities in an exponential be dimensionless?
 A: Let's look at what dimensional analysis tells us:

*

*If two quantities have different units, they're not the same. For example, kinetic energy can't be $mv$ or $mv^3$. (It could be $mv^2$; in Newtonian physics it's actually $\frac12mv^2$, but DA can't tell you that.) This makes some algebra mistakes easy to spot.

*Some problems of the form "which products of powers of these variables could be that variable?" have a unique solution; some don't, but we still get some constraints.

*Some such problems have no solution, which means there must be some other important variable you're missing.

*If $x+y$ makes sense then $x,\,y$ have the same dimension. If $ax^m+bx^n$ makes sense with dimensionless $a,\,b$ for $m\ne n$ then $x$ must be dimensionless. Therefore, series such as $e^x=1+x+x^2/2+\cdots$ require $x$ to be dimensionless.

A: When you say "dimensional analysis works" I assume you mean to ask, why does it make sense that both sides of an equation involving physical units should always have the same dimension.
Well, if for example you know that $distance=speed\cdot time$ or concisely $x=v\cdot t$ then it follows that the units of speed and time should be so defined as to provide you with units of distance when multiplied:
$$L=\frac{L}{T}\cdot T$$
Note that while dimensional analysis can guide you about the general form of the equation, it doesn't enable you to always guess correctly at how an equation would look like precisely. For example also $x=2\cdot v\cdot t$ is dimensionally correct (since 2 is dimensionless) but this equation is clearly wrong.
Finally, it is not true that quantities in the exponent are always dimensionless. An example is the generic wave equation:
$$\psi{(x)}=e^{i(kx-wt)}$$
While the quantity in the exponential on the whole is dimensionless, as it must be because radians are dimensionless (Thanks John Alexiou for correction) quantities with dimension such as x and t can appear there
