3

I am having trouble formatting the following mathematical expression:

\begin{align*}
       A  &= \left(\left(\frac{1}{2},\frac{1}{2}\right) + \sqrt{2}Rot_{-\pi/4}\left\langle 0, \frac{1}{2} \right\rangle, \sqrt{2}Rot_{\pi/4}\left\langle 0, \frac{1}{2} \right\rangle \sqrt{2}Rot_{3\pi/4}\left\langle 0, \frac{1}{2} \right\rangle\right)\\
          &=  \left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
                             -\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
                             \sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
                           \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
                           \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{align*}

It gives me the following result:

enter image description here

I would like for the piece that runs off the page to just continue on the next line with a little bit of indentation. I tried to do this with more align symbols, but this fails because whenever I go to break the line, I leave an unmatched \left(.

How can I format this so that the piece of the equation that runs of the page continues onto the next line with a little bit of an indentation?

Thanks for all the help!

2

Use multline* instead.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
  \begin{multline*}
 \left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
                             -\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
                             \sin(\pi/4) & \cos(\pi/4) \end{pmatrix},\right.\\
                              \left. \qquad  \sqrt{2}                %% remove \qquad if you want
             \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
                           \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{multline*}
\end{document}

enter image description here

For the updated query and needs, use mathtools (instead of amsmath) and it multlined environment.

\documentclass{article}
\usepackage{mathtools}
\begin{document}
  \begin{align*}
       A  &= \left(\left(\frac{1}{2},\frac{1}{2}\right) + \sqrt{2}Rot_{-\pi/4}\left\langle 0, \frac{1}{2} \right\rangle, \sqrt{2}Rot_{\pi/4}\left\langle 0, \frac{1}{2} \right\rangle \sqrt{2}Rot_{3\pi/4}\left\langle 0, \frac{1}{2} \right\rangle\right)\\
          &=\!\!
          \begin{multlined}[t]
 \left(\left(\frac{1}{2},\frac{1}{2}\right)+ \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & \sin(\pi/4) \\
                             -\sin(\pi/4) & \cos(\pi/4) \end{pmatrix}, \sqrt{2}
             \begin{pmatrix} \cos(\pi/4) & -\sin(\pi/4) \\
                             \sin(\pi/4) & \cos(\pi/4) \end{pmatrix},\right.\\[\jot]
                              \left. \qquad  \sqrt{2}                %% remove \qquad if you want
             \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}
                           \begin{pmatrix} \cos(3\pi/4) & -\sin(3\pi/4) \\
                             \sin(3\pi/4) & \cos(3\pi/4) \end{pmatrix}\right)\\
\end{multlined}
\end{align*}
\end{document}

enter image description here

  • This is actually currently inside an \begin{align*} with other expressions all aligned by an = sign. When I tried multline` I got the following error: Extra alignment tab has been changed to \cr. --- TeX said --- <template> ...l \lineht@ \dp \z@ \fi \endtemplate l.574 \end{multline*}` – CodeKingPlusPlus Oct 15 '14 at 4:37
  • @CodeKingPlusPlus Can you append that to the code in your question? – user11232 Oct 15 '14 at 5:05
  • I just updated my question with the LaTeX code and the corresponding output -- Thanks for your help! – CodeKingPlusPlus Oct 15 '14 at 17:32
  • @CodeKingPlusPlus See the update. – user11232 Oct 16 '14 at 0:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.