# How to align matrices on top of each other?

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

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\newcommand{\mymatrix}{\begin{bmatrix}  1 &1\\0& 0  \end{bmatrix}}
\begin{align*}
\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.
\end{align*}
\end{document}


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:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\newcommand{\mymatrix}{\begin{bmatrix}  1 &1\\0& 0  \end{bmatrix}}
\begin{alignat*}{3}
\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.
\end{alignat*}

\begin{alignat*}{3}
\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.
\end{alignat*}
\end{document}


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:

• Maybe will be better \shortintertext{and}. It produce less space between equation lines. – Zarko Jan 5 '16 at 19:34
• @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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 1, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9989173412322998, "perplexity": 6128.789543744854}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496670987.78/warc/CC-MAIN-20191121204227-20191121232227-00354.warc.gz"}