1

I am trying to align matrices in three questions like an array but I have an enumerate list. If I create the array then the lists won't show.

\item \(\begin{pmatrix*}[r]
            20 & 25 & 20 \\
            15 & 20 & 18 \\
            18 & 23 & 22
            \end{pmatrix*}\)
            \(\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*}\) =
            \(\begin{pmatrix*}[r]
            975 \\
            810 \\
            965
            \end{pmatrix*}\) 
            \(\qquad\qquad\Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*}\) = 
           \(\begin{pmatrix*}[r]
            10 \\
            15 \\
            20
            \end{pmatrix*}\)
    \item \(\begin{pmatrix*}[r]
            90 & 95 & 80 \\
            80 & 85 & 90 \\
            75 & 90 & 95
            \end{pmatrix*}\)
           \(\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*}\) = 
           \(\begin{pmatrix*}[r]
            86 \\
            86 \\
            88
            \end{pmatrix*}\)
            \(\qquad\qquad\Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*}\) = 
           \(\begin{pmatrix*}[r]
            0.3 \\
            0.2 \\
            0.5
            \end{pmatrix*}\)
    \item \(\begin{pmatrix*}[r]
            5,000 & 4,000 \\
            6,000 & 5,000
            \end{pmatrix*}\)
           \(\begin{pmatrix*}[r]
            x \\
            y \\
            \end{pmatrix*}\) = 
           \(\begin{pmatrix*}[r]
            37,000,000 \\
            45,000,000 \\
            \end{pmatrix*}\)
            \(\qquad\qquad\Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            \end{pmatrix*}\) = 
           \(\begin{pmatrix*}[r]
            5000 \\
            3000
            \end{pmatrix*}\)
  • 1
    (1) welcome, (2) please provide a full compilable example that others can copy and test without having to add anything. Here for example, one needs to know that mathtools is needed – daleif Oct 6 '16 at 7:57
  • You'll probably have to make a box on each manually to align the \Rightarrows – daleif Oct 6 '16 at 7:59
2

This is an automatic solution, based on the eqparbox package. I defined an \eqmathbox command, which accepts $2$ optional arguments (the end of name of the box, and the alignment: l, r or c) and one mandatory argument: the contents of the math box.

\documentclass{article}
%\usepackage{enumitem} 
\usepackage{mathtools}
\usepackage{xparse} 
\usepackage{eqparbox}
\NewDocumentCommand\Eqmathbox{O{0}O{l}m}{\eqmakebox[Form#1][#2]{\ensuremath{ \displaystyle#3}}}
\usepackage{siunitx} 
\sisetup{group-separator={,},group-minimum-digits = 4}

\begin{document}

\begin{enumerate}
\item \(\Eqmathbox{\begin{pmatrix*}[r]
        20 & 25 & 20 \\
        15 & 20 & 18 \\
        18 & 23 & 22
        \end{pmatrix*}
        \begin{pmatrix*}[r]
        x \\
        y \\
        z
        \end{pmatrix*} =
        \begin{pmatrix*}[r]
        975 \\
        810 \\
        965
        \end{pmatrix*}}
        \Rightarrow\Eqmathbox[1][r]{\begin{pmatrix*}[r]
        x \\
        y \\
        z
        \end{pmatrix*} =}
       \begin{pmatrix*}[r]
        10 \\
        15 \\
        20
        \end{pmatrix*}\)
\item \(\Eqmathbox{\begin{pmatrix*}[r]
        90 & 95 & 80 \\
        80 & 85 & 90 \\
        75 & 90 & 95
        \end{pmatrix*}
       \begin{pmatrix*}[r]
        x \\
        y \\
        z
        \end{pmatrix*} =
        \begin{pmatrix*}[r]
        86 \\
        86 \\
        88
        \end{pmatrix*}}
        \Rightarrow\Eqmathbox[1][r]{\begin{pmatrix*}[r]
        x \\
        y \\
        z
        \end{pmatrix*} =}
       \begin{pmatrix*}[r]
        0.3 \\
        0.2 \\
        0.5
        \end{pmatrix*}\)
\item \(\Eqmathbox{\begin{pmatrix*}[r]
        \num{5000} & \num{400}0 \\
        \num{6000} & \num{5000}
        \end{pmatrix*}
        \begin{pmatrix*}[r]
        x \\
        y \\
        \end{pmatrix*} =
       \begin{pmatrix*}[r]
        \num{37000000} \\
        \num{45000000 }\\
        \end{pmatrix*}}
        \Rightarrow\Eqmathbox[1][r]{\begin{pmatrix*}[r]
        x \\
        y \\
        \end{pmatrix*} =}
       \begin{pmatrix*}[r]
        \num{5000} \\
        \num{3000}
        \end{pmatrix*}\)
        \end{enumerate}

\end{document} 

enter image description here

3

Here is one way. Note that you are adding a lot of unneeded \(...\)-pairs. I've removed them. The only reason memoir is used, is because it is the default in my editor.

\documentclass[a4paper]{memoir}
\usepackage{mathtools}
\begin{document}

\begin{enumerate}
\item \(
  \mathmakebox[6cm][l]{
  \begin{pmatrix*}[r]
            20 & 25 & 20 \\
            15 & 20 & 18 \\
            18 & 23 & 22
            \end{pmatrix*}
            \begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*} =
            \begin{pmatrix*}[r]
            975 \\
            810 \\
            965
            \end{pmatrix*}
          }
          \qquad\qquad
          \Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*} = 
            \begin{pmatrix*}[r]
            10 \\
            15 \\
            20
            \end{pmatrix*}\)
    \item \(
      \mathmakebox[6cm][l]{
      \begin{pmatrix*}[r]
            90 & 95 & 80 \\
            80 & 85 & 90 \\
            75 & 90 & 95
            \end{pmatrix*}
            \begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*} = 
            \begin{pmatrix*}[r]
            86 \\
            86 \\
            88
            \end{pmatrix*}
            }
            \qquad\qquad\Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            z
            \end{pmatrix*} = 
            \begin{pmatrix*}[r]
            0.3 \\
            0.2 \\
            0.5
            \end{pmatrix*}\)
    \item \(
      \mathmakebox[6cm][l]{
      \begin{pmatrix*}[r]
            5,000 & 4,000 \\
            6,000 & 5,000
            \end{pmatrix*}
            \begin{pmatrix*}[r]
            x \\
            y \\
            \end{pmatrix*} = 
            \begin{pmatrix*}[r]
            37,000,000 \\
            45,000,000 \\
            \end{pmatrix*}
            }
            \qquad\qquad\Rightarrow\begin{pmatrix*}[r]
            x \\
            y \\
            \end{pmatrix*} = 
            \begin{pmatrix*}[r]
            5000 \\
            3000
            \end{pmatrix*}\)
          \end{enumerate}

\end{document}

enter image description here

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.