1

I would like to write an equation consisting of one equation with matrices and one equation referencing the above matrices underneath (see picture).enter image description here
What I tried can be seen in a minimized version in the code. It throws error 'Extra alignment tab has been changed to \cr'. When i skip the error multiple times every column stands in a own row.

\begin{equation}\label{eq:NewEul}\begin{split}
    \begin{bmatrix} M1 &        & 0  \\
                       & \ddots &    \\
                     0 &        & Mn \end{bmatrix} 
             & \begin{bmatrix} a1 \\
                               \vdots \\
                               an \end{bmatrix} 
             & = 
             & \begin{bmatrix} f1 \\
                               \vdots \\
                               fn \end{bmatrix} \\  
             M & a & = & f
\end{split}\end{equation} 

My question is: How do I need to modify my code regarding the alignment to match the style shown in the picture?

0

1 Answer 1

0

enter image description here

\documentclass{article}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{booktabs}

% for show just the equation ...
    \usepackage[active,displaymath,tightpage]{preview}
    \setlength\PreviewBorder{1em}

\begin{document}
    \begin{equation}\arraycolsep=0pt
                    \label{eq:NewEul}
    \begin{array}{*{8}{c}}
\begin{bmatrix}
\widehat{M}_1   &        & 0  \\
                & \ddots &    \\
0               &        & \widehat{M}_n
\end{bmatrix}
    & \begin{bmatrix}
    \hat{a}_1   \\
    \vdots      \\
    \hat{a}_n
      \end{bmatrix}
        & = & \begin{bmatrix}
            \hat{f}_1^c \\
            \vdots \\
            \hat{f}_n^c
              \end{bmatrix}
            & + &  \begin{bmatrix}
                \hat{f}_1^e \\
                \vdots \\
                \hat{f}_n^e
                   \end{bmatrix}
                & + &  \begin{bmatrix}
                    \hat{f}_1^r \\
                    \vdots \\
                    \hat{f}_n^r
                       \end{bmatrix}    \\
    \addlinespace
\bm{\widehat{M}} & \bm{\hat{a}}
        & = & \bm{\hat{f}_1^c}
            & + & \bm{\hat{f}_1^e}
                & + & \bm{\hat{f}_1^r}
    \end{array}
    \end{equation}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .