TITLE: What does $a^b$ mean?
QUESTION [5 upvotes]: Notation $a^b$ seems to be ubiquitous in mathematics and I think that most of us take it for granted. But, at least to me, it seems that it means totally different things depending on the context. 
In terms of general algebraic structures, if $a$ is an element of a magma with product function $(a_1,a_2)\mapsto a_1\cdot a_2$ and $b$ is a positive integer, then
$$
a^b=\underbrace{a\cdot a\cdot a...\cdot a}_{b\mbox{ times}}
$$
If $a$ is an element of a monoid, then we usually say that $a^0=1$. If $a$ is an element of a group, then $b$ can be any integer.
However, over the field of reals, $a^b=\exp(b\log a)$, and we only allow $a>0$. When working over the field of complex numbers $a^b$ is not even a function. I'm sure that notation $a^b$ arises in other contexts as well.
Why do we use the same notation $a^b$ for operations which seem absolutely different?

REPLY [3 votes]: What $a^b$ means is irrevocably context dependent.
In lower level (i.e. computation-based) math classes $a^b$ usually means exponentiation.  It's true that exponentiation can be computed by repeated addition when $a,b$ are positive integers, but that's not what exponentiation "is."  The true definition has to do with logarithms - I won't build this from the ground up, because that's already done in many places (not the least obvious of which is Wikipedia, and I'm sure in other places on MSE).
However, that's assuming that $a$ and $b$ are real numbers.  If either are complex numbers, exponentiation is defined completely differently.  If $a$ and $b$ are matrices, there's another definition (in fact multiple definitions) for exponentiation of matrices.
It doesn't stop there.  $a^b$ may have nothing to do with exponentiation of any kind.  In group theory, when $a$ and $b$ are group elements, $a^b$ is just shorthand for group conjugation, i.e. $a^b=b^{-1}ab$.  We even write functions that way - $a^b$ could also mean $b(a)$, where $b$ is a function.
In other words, in higher mathematics, the meaning of $a^b$ entirely depends on what structure you're working in and which discipline of mathematics you're doing.  $a^b$ is a simple and easy notation, so it attracts redefinition.