# When does exp(A) == exp.(A)?

**URL:** <https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369>\
**Category:** Offtopic\
**Tags:** linearalgebra\
**Created:** [May 16, 2021, 1:59pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369 "2021-05-16T13:59:23Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [May 18, 2021, 8:13pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/21 "2021-05-18T20:13:53Z")

</div>

@dlfivefifty, you posted a link above with one (numerical) answer to your own question:

 ![real_solution_exp.(A)_eq_exp(A)](https://global.discourse-cdn.com/julialang/original/3X/4/5/45de249d6d85135b14753c54ba29d988a594bb17.png)

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [May 18, 2021, 8:16pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/22 "2021-05-18T20:16:27Z")

</div>

Not a very convincing answer… even the complex explicit example is not convincing as there’s no proof…anyways it’s a silly question 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Dictino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dictino/32/217281_2.png) [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Post date:** [May 18, 2021, 8:45pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/23 "2021-05-18T20:45:33Z")

</div>

Just to be fair, you are asking for ≈ so @Mason computation is a valid “proof” 😉

---

<div class="post-metadata">

**Author:** ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Post date:** [May 18, 2021, 8:46pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/24 "2021-05-18T20:46:49Z")

</div>

My original question definitely said `==`

---

<div class="post-metadata">

**Author:** ![Dictino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dictino/32/217281_2.png) [@Dictino](https://discourse.julialang.org/u/Dictino)\
**Post date:** [May 18, 2021, 8:51pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/25 "2021-05-18T20:51:48Z")

</div>

My fault, I read the tittle not the original question 😅

---

<div class="post-metadata">

**Author:** ![bert](https://avatars.discourse-cdn.com/v4/letter/b/9e8a1a/32.png) [@bert](https://discourse.julialang.org/u/bert)\
**Post date:** [May 18, 2021, 9:42pm UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/26 "2021-05-18T21:42:04Z")

</div>

For any projection matrix P, P^2=P and e^P=I+(e-1)P. If P=\begin{bmatrix}x\_1&y\_1\\y\_2&x\_2\end{bmatrix}, then the first equation implies

\begin{align\*} x\_i^2+y\_1y\_2&=x\_i\\ y\_i(x\_1+x\_2)&=y\_i \end{align\*}

and the second implies

\begin{align\*} 1+(e-1)x\_i&=e^{x\_i}\\ (e-1)y\_i&=e^{y\_i} \end{align\*}

Solving these eight equations over the complex numbers is left as an exercise for the reader 😉. I’d imagine Mathematica could do it with enough computation time.

---

<div class="post-metadata">

**Author:** ![antoine-levitt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antoine-levitt/32/4008_2.png) [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Post date:** [May 19, 2021, 6:04am UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/27 "2021-05-19T06:04:50Z")

</div>

With some effort and interval arithmetic you can convert it into a proper proof (you just tweak the proof of convergence of Newton : if you are at a point x where F is small enough, F’ is inversible and F’’ is bounded in a ball around x, then there is a solution close to x). Agreed it’s a silly question though 🙂

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [May 19, 2021, 6:12am UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/28 "2021-05-19T06:12:18Z")

</div>

This vaguely reminds me of a fun math puzzle. Find a function `f` from `R` to `R` such that `f^-1(x)=f'(x)`. (For bonus points, such that `f^-1(x)=d^n*f/dx^n(x)` ie the nth derivative is the inverse).

---

<div class="post-metadata">

**Author:** ![Wei\_Yang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wei_yang/32/23951_2.png) [@Wei\_Yang](https://discourse.julialang.org/u/Wei_Yang)\
**Post date:** [May 19, 2021, 6:27am UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/29 "2021-05-19T06:27:45Z")

</div>

Not sure if you are talking about the following

> Is there a one-to one and onto function f:(0, \infty) \longrightarrow(0, \infty) such that f^{\prime}=f^{-1}?

The answer is yes, and involves golden ratio (at least the one I found)…

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [May 19, 2021, 6:56am UTC](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369/30 "2021-05-19T06:56:54Z")

</div>

> [@dlfivefifty](#):
>
> even the complex explicit example is not convincing as there’s no proof

It’s not terribly difficult to prove. If A is a matrix of the form \begin{pmatrix} a & b & b \\ b & a & b \\ b & b & a \end{pmatrix} it can be diagonalized (eigenvalues are a - b, a - b, a + 2b) and it’s straightforward to compute e^A in closed form as a matrix of the same form as A with

\begin{align} a' &= \frac{2e^{a-b} + e^{a+2b}}{3} \\ b' &= \frac{e^{a+2b}-e^{a-b}}{3} \end{align}

To have `exp(A) = exp.(A)` we need a' = e^a and b' = e^b which is also straightforward to solve to

\begin{align} e^a &= -\frac{4}{3} \\ e^b &= -2 \end{align}

(unique up to that point) and the complex solution follows.

[Previous page](https://discourse.julialang.org/t/when-does-exp-a-exp-a/61369.md?page=1)
