# Verifying matrix exponential identity

I wish to verify the following matrix exponential identity using Mathematica:

$$\mathbb{e}^{i.x.\hat{n}.\sigma}= \cos{x}.\mathbb{I}+ i\sin{x}(\hat{n}.\sigma)$$

where $$\mathbb{I}$$ is the $$2\times2$$ identity matrix, $$i$$ is the imaginary unit, $$\hat{n}$$ is an arbitrary $$3$$-dimensional unit vector, $$x$$ is an arbitrary real number, and $$\sigma$$ is the $$3$$ component Pauli vector(whose components each contain one of the Pauli matrices).

I have tried the following:

 A = Array[PauliMatrix, 3]

n = Normalize[{a,b,c}]

MatrixExp[I*x*(n . A)] == Cos[x]*IdentityMatrix[2] + I*Sin[x]*(n . A)


but, to no avail. Can someone give any suggestions?

• Welcome! When you evaluate each side of your comparison separately, are you getting the expected results? Also, did you try using Simplify or FullSimplify on your comparison of the two sides? Regarding your post formatting, it is better to see your code when you format it using code blocks. Commented Feb 5, 2023 at 1:45

I think the easiest and fastest way is to help Mathematica. That is to use a FullSimplify with some Assumptions at the level of (n . A). Then, it's really fast. What this does is getting rid of the Abs in the expressions that were present without the assumptions.

MatrixExp[
I*x*FullSimplify[(n . A),
Assumptions -> {a >= 0 && b >= 0 && c >= 0}]] ==
Cos[x]*IdentityMatrix[2] +
I*Sin[x]*
FullSimplify[(n . A),
Assumptions -> {a >= 0 && b >= 0 && c >= 0}] //
Factor // Simplify


and another case

MatrixExp[
I*x*FullSimplify[(n . A),
Assumptions -> {a < 0 && b < 0 && c < 0}]] ==
Cos[x]*IdentityMatrix[2] +
I*Sin[x]*
FullSimplify[(n . A), Assumptions -> {a < 0 && b < 0 && c < 0}] //
Factor // Simplify


both give True

• Perfect. Thank you, Commented Feb 5, 2023 at 16:08
• @usernew76 glad I was able to help. thanks for the accept :-)
– bmf
Commented Feb 5, 2023 at 23:30