I'm trying to express a complicated mathematical expression involving the summation of two matrices. One matrix contains a summation with a condition ("a=0 or b=1"), which I'm expressing underneath the Sum symbol using the "substack" approach, as suggested in: https://en.wikibooks.org/wiki/LaTeX/Mathematics
Unfortunately, this causes the matrix bracket top and bottoms to misalign, as shown:
It would look better if this was not the case.
Can this be fixed please?
My MWE is:
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\begin{document}
Minimum working example:
\begin{equation*}
\dfrac{\mathrm{d}y}{\mathrm{d}x} =
\begin{bmatrix}
-\sum_{i=1}^{a} A & \cdots & B \\
\vdots & \ddots & \vdots \\
B & \cdots & -\sum_{i=1}^{a} A
\end{bmatrix}
+
\begin{bmatrix}
\sum_{\substack{
a,b,c,d \\
a=0~\mathrm{or}~b=1
}}
A_{ijkl}
-
\sum_{\substack{
a,b,c,d \\
a=0~\mathrm{or}~b=1
}}
B_{ijkl} \\
\vdots\\
\sum_{\substack{
a,b,c,d \\
a=0~\mathrm{or}~b=1
}}
C_{ijkl}
-
\sum_{\substack{
a,b,c,d \\
a=0~\mathrm{or}~b=1
}}
D_{ijkl}
\end{bmatrix}
\end{equation*}
\end{document}