TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 6 down vote accepted

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

share|improve this answer
Maybe will be better \shortintertext{and}. It produce less space between equation lines. – Zarko Jan 5 at 19:34
@Zarko: Thanks for the tip, I'm learning every day. – Jeroen Jan 5 at 19:35
@Zarko: Thanks, I've added \shortintertext{and} – Christian Hupfer Jan 5 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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