# Center-justifying first part of multline

Consider the following MWE. With my document setup, the equation has to be broken into two lines. Luckily I can get the entire matrix on one line, so I can break the equation after the equals sign. By breaking the equation with multline, however, the name of the matrix is left justified. I think it would be better to have the name center justified, as illustrated below. How can I center justify the first part of a multline?

\documentclass[11pt,b5paper]{scrreprt}
\usepackage[left=2.8cm,right=2.8cm]{geometry}
\usepackage{amsmath,amsfonts}

\begin{document}

\begin{multline}
\mathbf{R} = \\
\begin{bmatrix}
\mu + n_x^2 \left( 1 - \mu \right)      & n_x n_y \left( 1 - \mu \right) - n_z \nu  & n_x n_z \left( 1 - \mu \right) + n_y \nu  \\
n_y n_x \left( 1 - \mu \right) + n_z \nu    & \mu + n_y^2 \left( 1 - \mu \right)        & n_y n_z \left( 1 - \mu \right) - n_x \nu  \\
n_z n_x \left( 1 - \mu \right) - n_y \nu    & n_z n_y \left( 1 - \mu \right) + n_x \nu  & \mu + n_z^2 \left( 1 - \mu \right)
\end{bmatrix}
\end{multline}

\end{document}


-
I think it should be left justified; centering means the formula ends there. –  egreg Aug 1 '14 at 10:45

\documentclass[11pt,b5paper]{scrreprt}
\usepackage[left=2.8cm,right=2.8cm]{geometry}
\usepackage{amsmath,amsfonts}

\begin{document}
\noindent\hrulefill X\hrulefill
\begin{gather}
\mathbf{R} = \notag\\
\begin{bmatrix}
\mu + n_x^2 \left( 1 - \mu \right)      & n_x n_y \left( 1 - \mu \right) - n_z \nu  & n_x n_z \left( 1 - \mu \right) + n_y \nu  \\
n_y n_x \left( 1 - \mu \right) + n_z \nu    & \mu + n_y^2 \left( 1 - \mu \right)        & n_y n_z \left( 1 - \mu \right) - n_x \nu  \\
n_z n_x \left( 1 - \mu \right) - n_y \nu    & n_z n_y \left( 1 - \mu \right) + n_x \nu  & \mu + n_z^2 \left( 1 - \mu \right)
\end{bmatrix}
\end{gather}

\end{document}


Here is an alternative.

\documentclass[11pt,b5paper]{scrreprt}
\usepackage[left=2.8cm,right=2.8cm]{geometry}
\usepackage{mathtools,amsfonts}   % mathtools for shortintertext

\begin{document}

\begin{align}
\mathbf{R} &=
\begin{bmatrix}
\mu + n_x^2 a          & n_x n_y a - n_z \nu  & n_x n_z a + n_y \nu  \\
n_y n_x a + n_z \nu    & \mu + n_y^2 a        & n_y n_z a - n_x \nu  \\
n_z n_x a - n_y \nu    & n_z n_y a + n_x \nu  & \mu + n_z^2 a
\end{bmatrix}
\shortintertext{where}
a &= \left( 1 - \mu \right)\notag
\end{align}

\end{document}


-
+1 for the alternative. I just wouldn't bother myself with alignin the ='s, since it's not a true system of equations that requires it. But that' a matter of taste. –  yo' Aug 1 '14 at 10:58
This doesn't center justify the matrix name. Rather, it aligns the matrix name with the center of the matrix. I don't know which one is more aesthetically pleasing. However, this also vertically aligns the equation number with both the matrix name and the matrix, instead of aligning it with just the matrix (which is why I use multline). So how would you align the equation number correctly? –  eiterorm Aug 1 '14 at 11:05
@eiterorm Please see the edit. –  Harish Kumar Aug 1 '14 at 11:14
This is perfect. Thanks. –  eiterorm Aug 1 '14 at 11:16
@daleif Remnant from earlier code. I missed. Thank you for spotting. –  Harish Kumar Aug 1 '14 at 14:48