<s>[INST] How to find the logarithm of Pauli Matrix? When I solve some physics problem, it helps a lot if I can find
the logarithm of Pauli matrix.

e.g. $\sigma_{x}=\left(\begin{array}{cc}
0 & 1\\
1 & 0
\end{array}\right)$, find the matrix $A$ such that $e^{A}=\sigma_{x}$.

At first, I find a formula only for real matrix:
$$\exp\left[\left(\begin{array}{cc}
a & b\\
c & d
\end{array}\right)\right]=\frac{e^{\frac{a+d}{2}}}{\triangle}\left(\begin{array}{cc}
\triangle \cosh(\frac{\triangle}{2})+(a-d)\sinh(\frac{\triangle}{2}) & 2b\cdot \sinh(\frac{\triangle}{2})\\
2c\cdot \sinh(\frac{\triangle}{2}) & \triangle \cosh(\frac{\triangle}{2})+(d-a)\sinh(\frac{\triangle}{2})
\end{array}\right)$$
where $\triangle=\sqrt{\left(a-d\right)^{2}+4bc}$
but there is no solution for the formula on this example;
After that, I try to Taylor expand the logarithm of $\sigma_{x}$:
$$
\log\left[I+\left(\sigma_{x}-I\right)\right]=\left(\sigma_{x}-I\right)-\frac{\left(\sigma_{x}-I\right)^{2}}{2}+\frac{\left(\sigma_{x}-I\right)^{3}}{3}...
$$
$$
\left(\sigma_{x}-I\right)=\left(\begin{array}{cc}
-1 & 1\\
1 & 1
\end{array}\right)\left(\begin{array}{cc}
-2 & 0\\
0 & 0
\end{array}\right)\left(\begin{array}{cc}
-\frac{1}{2} & \frac{1}{2}\\
\frac{1}{2} & \frac{1}{2}
\end{array}\right)
$$
\begin{eqnarray*}
\log\left[I+\left(\sigma_{x}-I\right)\right] & = & \left(\begin{array}{cc}
-1 & 1\\
1 & 1
\end{array}\right)\left[\left(\begin{array}{cc}
-2 & 0\\
0 & 0
\end{array}\right)-\left(\begin{array}{cc}
\frac{\left(-2\right)^{2}}{2} & 0\\
0 & 0
\end{array}\right)...\right]\left(\begin{array}{cc}
-\frac{1}{2} & \frac{1}{2}\\
\frac{1}{2} & \frac{1}{2}
\end{array}\right)\\
 & = & \left(\begin{array}{cc}
-1 & 1\\
1 & 1
\end{array}\right)\left(\begin{array}{cc}
-\infty & 0\\
0 & 0
\end{array}\right)\left(\begin{array}{cc}
-\frac{1}{2} & \frac{1}{2}\\
\frac{1}{2} & \frac{1}{2}
\end{array}\right)
\end{eqnarray*}
this method also can't give me a solution.
 [/INST] As March comments:

$e^{ia(\hat{n}\cdot\vec{\sigma})}=I\cos(a)+i(\hat{n}\cdot\vec{\sigma})\sin(a)$
  would be of use

For this example, set $a=\frac{\pi}{2}$, $\hat{n}\cdot\vec{\sigma}=\sigma_{x}$,
the Euler's formula is rewritten as:
$$
e^{i\frac{\pi}{2}\sigma_{x}}=i\sigma_{x}=e^{i\frac{\pi}{2}I}\sigma_{x}
\tag{1}$$
Since $[\sigma_{x},I]=0$, we can combine two exponentials to get:
$$
e^{i\frac{\pi}{2}\sigma_{x}-i\frac{\pi}{2}I}=\sigma_{x}
\tag{2}$$
Finally, we get a solution for $A$: $A=i\frac{\pi}{2}\sigma_{x}-i\frac{\pi}{2}I=\left(\begin{array}{cc}
-i\frac{\pi}{2} & i\frac{\pi}{2}\\
i\frac{\pi}{2} & -i\frac{\pi}{2}
\end{array}\right)$.
If we consider periodic conditions in equations (1) and (2), we may
get the same result as higgsss gets here. 
The procedure is identical for other Pauli Matrices except the subscript, as a result:

$A=i\frac{\pi}{2}(\sigma_{j}-I)$ is a solution for
  $e^{A}=\sigma_{j}$,$j\in\{x,y,z\}$.

</s>