Fundamental question about dimensional analysis In dimensional analysis, it does not make sense to, for instance, add together two numbers with different units together. Nor does it make sense to exponentiate two numbers with different units (or for that matter, with units at all) together; these expressions make no sense:
$$(5 \:\mathrm{m})^{7 \:\mathrm{s}}$$
$$(14 \:\mathrm{A})^{3 \:\mathrm{A}}$$
Now my question is plainly this: why do they not make sense? Why does only multiplying together numbers with units make sense, and not, for instance, exponentiating them together? I understand that raising a number with a unit to the power of another number with a unit is quite unintuitive - however, that's not really a good reason, is it?
 A: A standard argument to deny possibility of inserting dimensionful quantities into transcendental functions is the following expression for Taylor expansion of e.g. $\exp(\cdot)$:
$$ e^x = \sum_n \frac{x^{n}}{n!} = 1 + x +\frac{x^2}{2} + \dots\,.\tag1$$
Here we'd add quantities with different dimensions, which you have already accepted makes no sense.
OTOH, there's an argument (paywalled paper), that in the Taylor expansion where the derivatives are taken "correctly", you'd get something like the following for a function $f$:
\begin{multline}
f(x+\delta x)=f(x)+\delta x\frac{df(x)}{dx}+\frac{\delta x^2}2\frac{d^2f(x)}{dx^2}+\frac{\delta x^3}{3!}\frac{d^3f(x)}{dx^3}+\dots=\\
=f(x)+\sum_{n=1}^\infty\frac{\delta x^n}{n!}\frac{d^nf(x)}{dx^n},\tag2
\end{multline}
and the dimensions of derivatives are those of $1/dx^n$, which cancel those of $\delta x^n$ terms, making the argument above specious.
A: (I know I am answering an old question, but I think the following is a nice way to explain to young students.)
You don't need to know Taylor expansions. Simply remember the definition of the exponential. It satisfies the differential equation
$$
\frac{\text d y}{\text d x} = y(x)
$$
According to this, the derivative of $\text e^x$ has the same dimension as $\text e^x$. Therefore, $x$ should be dimensionless, since the derivative of $\text e^x$ has the dimension of $\text e^x$ divided by $x$. (This assertion comes from the definition of the derivative as a limit and it is also suggested by the $\text d / \text d x$ notation.)
A: The community wiki answer seems to have become an inconclusive mixture of opinions, followed by a long comment thread that is difficult to interpret. The paper being referred to there is Matta et al., http://pubs.acs.org/doi/pdf/10.1021/ed1000476 . The Matta paper claims to correct "common misconceptions and errors," but in fact much of their own reasoning is specious.
As Matta points out, there is no reason that a transcendental function must take a unitless input and give a unitless output. For example, let f(t)=(1 meter)exp[t/(1 second)]. This is a perfectly sensible transcendental function, and it takes a unitless input and gives a unitless output. If you take its Taylor series, you will find that the coefficients of the series have the right units so that f can be defined, if you wish, in terms of its Taylor series.
All you can say along these lines is that a lot of the standard functions require unitless inputs and give unitless outputs if you define them by their Taylor series. This is by no means a conclusive argument in all cases, both because we can have functions other than the standard ones (such as the f defined above) and because not all functions need to be or even can be defined in terms of Taylor series.
A good example is the square root function. We wouldn't want to define it in terms of its Taylor series about x=0, because it doesn't have such a Taylor series. If we wanted to be perverse, then we could define it in terms of its Taylor series about some point b>0. Then all that would happen would be that if b had units, so would the coefficients in the Taylor series.
When dealing with logs and exponents, it is not obvious nonsense to do things like taking logs of unitful quantities. For example, you can say that ln(5 meters)=ln(5)+ln(meters).
Matta complains that log(meters) doesn't make sense, because what power y would you raise e to in order to get meters? All they have really proved here is that y is not a quantity that fits into the algebra of unitful quantities. This is a weak argument, since by introducing unitful quantities, we have already extended the algebra of the reals. For example, if we have three base units (m, kg, s), then the algebra of unitful quantities is isomorphic to the direct product RxQxQxQ. For example, 7 newtons would be represented by the 4-tuple (7,1,1,-2), where the second through fourth entries are the exponents of the base units, and the group operation for multiplication is defined in terms of multiplying the first entry and adding the others. So it's perfectly reasonable to imagine extending this algebra to include things like ln(meters). A more cogent objection would be that this algebra doesn't have nice properties, e.g., it isn't a field.
Matta points out correctly that there are perfectly good alternatives to writing things like ln(5 meters). For example, one can write ln[(5 meters)/(1 meter)], and this is the style preferred by the journal in which the paper was published. But this is merely a matter of style, not logic.
A: Because of the way an exponential is defined. By an expression like $a^b$ we mean to say that the quantity $a$ is multiplied $b$ times with itself. Thus an expression like $(5m)^{7s}$ would mean $5m$ multiplied "7 seconds" times with itself, which is meaningless.
A: One further point to note, is that strictly one is just saying that the exponent is dimensionless, not that it does not contain expressions with dimension. So for example we could have some expression like $X=a^{(E/E_0)}$ where the exponent for a is a ratio of energies.
There are several restrictions on the space (sometimes viewed as a vector space) of dimensional quantities: for example units are raised to rational, but not irrational values. This allows a theorem: The Buckingham $\Pi$ Theorem to form.
