I'm trying to line-break in the middle of a series of defined matrices. The code looks like:
\begin{equation}
I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix},
X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix},
Y = \begin{pmatrix} 0 & \imath \\ -\imath & 0 \end{pmatrix}, \\
Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix},
H = \frac{1}{\sqrt2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix},
S = \begin{pmatrix} 1 & 0 \\ 0 & \imath \end{pmatrix}.
\end{equation}
However the matrices appear all in one line.


gatheroraligninstead ofequation. Side note: are you sure you want to use\imathhere? Why not justi? – jub0bs Apr 03 '14 at 11:50\documentclass{...}and ending with\end{document}. – Apr 03 '14 at 12:15