[Tex/LaTex] breaking lines in a matrix/array environment

arraysmatricesspacingvertical alignment

I have a matrix whose entries are quite long and must be broken up across multiple lines. The desired break-points are the + operators separating terms in each matrix element. The following code is illustrative of the problem I face: the + operators in the second line of each matrix element appear as unary rather than binary operators. Can this be changed?

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[\begin{bmatrix}
 a + b &  e + f \\
+c + d & +g + h \\[6pt]
 i + j &  m + n \\
+k + l & +o + p \\
\end{bmatrix}\]
\end{document}

I would most prefer if each term was aligned vertically with the corresponding term below it (e.g., a+b in vertical alignment with c+d), with the additional + sign to the left, and properly spaced from the ensuing c (i.e., subjected to the spacing that is accorded to binary operators).

Also, as a means of clarifying that the top two lines and bottom two lines separately constitute single rows, I introduced whitespace between lines 2 and 3 by adding [6pt] after the closing \\ of the second matrix line). Is there a better way to selectively introduce whitespace?

Lastly, is there a more automated way to achieve line-breaking in a matrix environment, compared to my manual separation of long lines across \\ separators? Thanks.

Best Answer

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\[\begin{bmatrix*}[r]
   a + b &    e + f \\
{}+c + d & {}+g + h \\[6pt]
   i + j &    m + n \\
{}+k + l & {}+o + p \\
\end{bmatrix*}\]
\end{document}

enter image description here