Why is $a^{-x}$ defined to be equal to $\frac{1}{a^x}$? I have searched the reason behind this definition in two textbooks and haven't found any. They just state that this is the definition but don't ever give any motivation for why this is truth.
Edit: 
I figured out why that relation must be true about 10 seconds after posting the question. Instead of looking for explanations I should have thought for a while. Still, thank you everyone.
 A: A fundamental property of power is $a^x\cdot a^y=a^{x+y}$ for nonzero $a$.
Then, $a^x\cdot a^{-x}$ should be $a^{x-x}=a^0=1$. Therefore $a^{-x}$ should be $1/a^x$.
A: $a^0=1$
$a^0=a^{x-x}=a^x a^{-x}=1$.
Thus : $a^{-x}$ is the multiplicative inverse of $a^x$.
A: As you said, this is a matter of definition, but this choice is not random. Here is a short explanation why mathematicians chose this definition.
If you define exponentiation for $a\in \mathbb Z^+$ and $b\in \mathbb Z^+$ using repeated multiplication, or define it recursively as
$$a^1=a$$
$$a^{b+1}=a\cdot a^b$$
Then the following fundamental property follows:
$$a^x\cdot a^{y}=a^{x+y}$$
In order to define $a^b$ for $b\in\mathbb Z\setminus\{0\}$, we may simply assume that this property holds for all $x,y\in\mathbb R$. If we take this to be true, then we may deduce the value of $a^0$, since
$$a^0\cdot a^{b}=a^{b}\implies a^0=1$$
From this it would follow that
$$a^x\cdot a^{-x}=a^0=1\implies a^{-x}=\frac{1}{a^x}$$
which is the proposition that you are wondering about.
A: Short answer:
For  positive integers $m$ and $n$ the identity
$$
a^{m+n} = a^m a^n
$$
is  obvious when you define exponentiation as repeated multiplication.
That identity is so important that we want to preserve it when we allow other kinds of values for the exponents.
The first consequence is
$$
a^0 = 1 .
$$
Then it's easy to show that $a^{-n}$ must be $1/a^n$.
The rules for rational exponents follow too - e.g. the $1/2$ power  is the square root.
Extending the definition to all real numbers is a little more subtle.
A: We originally establish that for $q>0$ we have:
$$a^q \cdot a = a^{q+1}$$
We rearrange this to:
$$a^q=a^{q+1} \div a$$
Let $q=0$. We then see that:
$$a^0=a^1\div a = 1$$
Then $q=-1$ leads to $$a^{-1}=1\div a$$
A continuation of this process, combined with extensive use of $$\frac{(\frac ab)}{c}=\frac{a}{bc}$$ implies that:
$$a^{-n}=\frac{1}{a^n}$$ is a suitable notation to extend the first statement I gave to all $q\in\Bbb Z$
