Matrix exponential weirdness in WolframAlpha - it fails on diagonal matrices?

710 Views Asked by At

So Wikipedia says this, which makes sense:

Wikipedia

But Wolfram computed this:

Wolfram

Is this a bug or am I just extremely tired?

2

There are 2 best solutions below

3
On BEST ANSWER

For the matrix exponential, use MatrixExp instead of Exp. Wolfram Alpha interprets Exp to be the entrywise exponentiation.

0
On

In Mathematica:

MatrixExp[{{2, 0, 0, 0}, {0, 3, 0, 0}, {0, 0, 4, 0}, {0, 0, 0, 5}}]

(* {{E^2, 0, 0, 0}, {0, E^3, 0, 0}, {0, 0, E^4, 0}, {0, 0, 0, E^5}} *)

N@% //MatrixForm

$$\left( \begin{array}{cccc} 7.38906 & 0. & 0. & 0. \\ 0. & 20.0855 & 0. & 0. \\ 0. & 0. & 54.5982 & 0. \\ 0. & 0. & 0. & 148.413 \\ \end{array} \right)$$