Suppose I have the following situation (don't mind the notations, it's ring theory):

Ugly matrices.


    \newcommand{\mymatrix}{\begin{bmatrix}  1 &1\\0& 0  \end{bmatrix}}
    \begin{bmatrix} a&b\\c&d    \end{bmatrix}\mymatrix&=\begin{bmatrix} a&a\\c&c    \end{bmatrix}\in Rx\\[\parskip]
    \text{and}\qquad\mymatrix\begin{bmatrix} a'&b'\\c'&d'   \end{bmatrix}&=\begin{bmatrix} a'+c'&b'+d'\\0&0 \end{bmatrix} \in xR.

It's clear that the brackets are now all over the place. How can I align the matrices on the left hand side two-by-two on top of each other? I suppose one could give them all the same width, but I don't know how to do that.


Caution: I have no idea what \in Rx means (x\in\mathbb{R}) perhaps?

Here's an alignat* version, using some additional & to align the several matrices and = signs:


    \newcommand{\mymatrix}{\begin{bmatrix}  1 &1\\0& 0  \end{bmatrix}}
    \begin{bmatrix} a&b \\ c&d    \end{bmatrix} & \mymatrix                                &=&\begin{bmatrix} a&a\\c&c    \end{bmatrix}\in Rx \\[\parskip]
    \intertext{and}\mymatrix                 & \begin{bmatrix} a'&b'\\c'&d'   \end{bmatrix}&=&\begin{bmatrix} a'+c'&b'+d'\\0&0 \end{bmatrix} \in xR.

    \begin{bmatrix} a&b \\ c&d    \end{bmatrix} & \mymatrix                                &=&\begin{bmatrix} a&a\\c&c       \end{bmatrix}\in Rx \\[\parskip]
   \shortintertext{and}\mymatrix                 & \begin{bmatrix}  a'&b'\\c'&d'   \end{bmatrix}&=&\begin{bmatrix} a'+c'&b'+d'\\0&0 \end{bmatrix} \in xR.

I suggest to use \intertext{and} instead of \text{and}\qquad... (or even better, use \shortintertext (thanks to @Zarko who recommended) this.)

Here's the output:

enter image description here

  • 2
    Maybe will be better \shortintertext{and}. It produce less space between equation lines. – Zarko Jan 5 '16 at 19:34
  • 1
    @Zarko: Thanks for the tip, I'm learning every day. – Jeroen Jan 5 '16 at 19:35
  • @Zarko: Thanks, I've added \shortintertext{and} – user31729 Jan 5 '16 at 19:38

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.