# Exponentiation with Matrices

How would exponentiation be done with matrices?

For example:

$$\left[\begin{array}{cc}1&2\\8&7\end{array}\right]^{\left[\begin{array}{cc}7&4\\2&9\end{array}\right]}$$

Where both base and exponent are matrices.

$$\left[\begin{array}{cc}1&2\\8&7\end{array}\right]^6$$

Where the base is a matrix, and the exponent is not.

$$6^{\left[\begin{array}{cc}7&4\\2&9\end{array}\right]}$$

Where the base is not, and the exponent is a matrix.

Wolfram Alpha doesn't recognize it, which makes me wonder if it is even possible.

• The second case is clear, for the other cases it might help that $\exp(A)$ is defined as $$\exp(A)=\sum_{k=0}^\infty \frac{A^k}{k!}$$ Commented Dec 12, 2016 at 0:17
• interesting question. what about defining $a^b$ as $e^{b \ln a}?$ you will need $a$ to be positive definite so that you can define $\ln a$ by the mclaurin series.
– abel
Commented Dec 12, 2016 at 13:25

Using abel and Peter's comments, I was able to solve my first question (matrix exponentiation with two matrices).

Please let me know if I am incorrect in any of my logic.

$$\text{Using a random example:} \\ a = \begin{bmatrix} 1 & 2\\ 8 & 7 \end{bmatrix} \\ b = \begin{bmatrix} 7 & 4\\ 2 & 9 \end{bmatrix} \\ a^{b} = e^{b\ln(a)} \\ \ln(a) = \begin{bmatrix}\ln(1)&\ln(2)\\\ln(8)&\ln(7)\end{bmatrix} \\ \\ a^b = e^{\begin{bmatrix}7&4\\2&9\end{bmatrix}\times\begin{bmatrix}\ln(1)&\ln(2)\\\ln(8)&\ln(7)\end{bmatrix}} \\ a^b = \begin{bmatrix} 7 & 16\\ 256 & 4782969 \end{bmatrix}$$

Wolfram Alpha corroborates the final exponential arithmetic, $e^{\begin{bmatrix}7&4\\2&9\end{bmatrix}\times\begin{bmatrix}\ln(1)&\ln(2)\\\ln(8)&\ln(7)\end{bmatrix}}$, link here.

• Yes, but ... $ln(A)$ is not the $ln$ of each component, and in general $B$ and $ln(A)$ do not commute so is it $e^{Bln(a)}$ or $e^{ln(A)B}$ ? Commented Dec 13, 2016 at 0:35
• @GCab In the case of $e^{a\ln{b}}$ it is equivalent to $b^a$, while $e^{b\ln{a}}$ is equivalent to $a^b$. In my answer I use the correct equivalence: $a^b=e^{b\ln{a}}$. At least this is my understanding, but I may be missing something. Commented Dec 13, 2016 at 1:44
• @GCab As far as taking the log of a matrix, it is the same as taking the log of each number inside the matrix. Wolfram Alpha corroborates this. Commented Dec 13, 2016 at 1:47
• Concerning the logarithm of a matrix
The logarithm (understood as the inverse of exp) of a matrix is not the log of each component: example $$\exp \left( {\left( {\begin{array}{*{20}c} 0 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{array} } \right)} \right) = \left( {\begin{array}{*{20}c} 0 & 0 & 0 \\ 1 & 0 & 0 \\ {1/2} & 1 & 0 \\ \end{array} } \right)\quad \quad \exp \left( {\left( {\begin{array}{*{20}c} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \\ \end{array} } \right)} \right) = \left( {\begin{array}{*{20}c} e & 0 & 0 \\ e & e & 0 \\ {1/2e} & e & e \\ \end{array} } \right)$$ To my knowledge, it can instead be defined through the Taylor expansion of $ln(\mathbf X)$ or better, of $ln(\mathbf I + (\mathbf X - \mathbf I))$ when this is convergent.
• Concerning the matrices commutation

You shall be aware that the product of two Matrices $\mathbf A$ and $\mathbf B$, in general does not commute. Same for the product of $ln(\mathbf A)$ and $\mathbf B$.
You can "define" $\mathbf A ^{\mathbf B}$ as you like, as far as you state the properties you expect therefrom.

• For my uses, Wolfram Alpha tells me that it is the same as taking the log of each number inside the matrix: link here. It is also the same as taking the $\exp$ of the matrix: link here. You may still be correct, I am still a learning. Commented Dec 14, 2016 at 1:06
• well, it's comforting that you admit that you are still learning. And one thing you shall learn asap that an instrument shall be in your hands, and not vice versa: try and write "h^{{a,b},{c,d}} = {{h^a,h^b},{h^c,h^d}}" or "exp{{a,b},{c,d}} = {{exp(a),exp(b)},{exp(c),exp(d)}}" and see what you get. Commented Dec 15, 2016 at 0:19
• Here is what I get for the first case, and the second case. Both still return "True" Commented Dec 16, 2016 at 0:45
• In fact, so what do you deduct from these? Commented Dec 16, 2016 at 10:14