[Tex/LaTex] Aligning Multiline Matrix Equations

alignamsmathmultline

I need to align two equations, one of which spans two lines.

I've tried the solution here, but this isn't for matrix equations, and it doesn't seem to work with these.

My minimized code is:

\begin{align}           %start alignment between state and observation equation 
%State Equation
\begin{split}           %split the observation equation in two so it fits on the page
\begin{bmatrix}
a\\
b\\
c
\end{bmatrix}
&=                    %This & is to align the state and observation equation
\begin{bmatrix}
a&b\\
b&c\\
d&e
\end{bmatrix}
&                        %This & is to align the splitted state equation
\begin{bmatrix}
a\\
b\\
c
\end{bmatrix}\\           %This \\is to split the state equation
+
\begin{bmatrix}
a&b\\ 
b&c\\ 
c&d
\end{bmatrix}
\begin{bmatrix}
a\\
b\\
c\\
\end{bmatrix} +
\begin{bmatrix}
a\\
b
\end{bmatrix}
&a                         %This & is to align the splitted state equation
\end{split} \\             %This \\ is to split the state and observation equation
%Observation Equation
a &=                       %This & is to align the state and observation equation
\begin{bmatrix}
a & b
\end{bmatrix}
\begin{bmatrix}
a\\
b
\end{bmatrix}
\end{align}

I've minimized the code slightly in the above example for readability. But my actual output looks like this:

enter image description here

Annoyingly equation 5.17 (The state equation) splits into 3 instead of into 2 so it fits on the page. I also get the error Extra alignment tab has been changed to \cr.

How do I get it so equation 5.17 is split into two, and also equation 5.17 and 5.18 are aligned?

Desired look

enter image description here

But with less space between the two parts of the state equation (5.17)

Best Answer

The split is redundant to the align. Simply use \notag to avoid putting an equation number on any particular line.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align}           %start alignment between state and observation equation 
%State Equation
%\begin{split}           %split the observation equation in two so it fits on the page
\begin{bmatrix}
a\\
b\\
c
\end{bmatrix}
&=                    %This & is to align the state and observation equation
\begin{bmatrix}
a&b\\
b&c\\
d&e
\end{bmatrix}
\begin{bmatrix}
a\\
b\\
c
\end{bmatrix} \notag \\ %split here
&\quad +
\begin{bmatrix}
a&b\\ 
b&c\\ 
c&d
\end{bmatrix}
\begin{bmatrix}
a\\
b\\
c\\
\end{bmatrix} +
\begin{bmatrix}
a\\
b
\end{bmatrix} a
\\             %This \\ is to split the state and observation equation
%Observation Equation
a &=                       %This & is to align the state and observation equation
\begin{bmatrix}
a & b
\end{bmatrix}
\begin{bmatrix}
a\\
b
\end{bmatrix}
\end{align}

\end{document}

matrix equations