# \bmatrix enviroment, vertical spacing of the first entry

I have the following equation:

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath}
\begin{align}
\begin{bmatrix}
\dot x \\\dot  \varphi \\\dot  v \\\dot  \omega
\end{bmatrix} = \begin{bmatrix} %% \vspace{5pt} does not work
v \\ \omega \\ x \omega^2 - g \sin{\varphi} \\[5pt]
\displaystyle{- \frac{\left( m_2x-m_1a \right)g\cos\varphi - 2m_2xv\omega}
{I_O +m_2x^2}}
\end{bmatrix}
\end{align}
\end{document}


and, since LHS (left-hand side) has dots over the variables, RHS (right-hand side) is slightly vertically offset to the LHS. Therefore, I would like to lower all RHS of the equation starting from the first entry.

I know we can manage vertical spacing finishing line with \\[5pt], but I don't know how to apply it for the first entry - aligning \dot{x} with v.

• please help us to help you! provide complete small document (called mwe: minimal working example), which we can copy and compile in our computers. and explain what is LHS and RHS ... – Zarko Aug 25 '17 at 18:46
• I think the problem comes from the fraction in the r.h.s. Why do you want l.h.s. and r.h.s. rows to be aligned? – Bernard Aug 25 '17 at 18:50
• @Bernard You're right, it's more of a \frac issue rather than dots. Nevertheless, I would like to keep the aesthetics by having entries aligned, as well as, it bugs me - how to lower all column down. – Maverick Aug 25 '17 at 18:56

I'm not sure what the problem is: the two matrices have different vertical size, but equality of matrices doesn't depend on the alignment of rows.

You can get the left hand side the same as the right hand side, but the result is not at all pretty.

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath}

\begin{document}

\begin{gather}
\begin{bmatrix}
\dot{x} \\ \dot{\varphi} \\ \dot{v} \\[5pt] \dot{\omega} \vphantom{\dfrac{m_1}{I_Ox^2}}
\end{bmatrix} =
\begin{bmatrix}
v \\ \omega \\ x \omega^2 - g \sin{\varphi} \\[5pt]
- \dfrac{( m_2x-m_1a)g\cos\varphi - 2m_2xv\omega}
{I_O +m_2x^2}
\end{bmatrix}
\\
\begin{bmatrix}
\dot x \\\dot  \varphi \\\dot  v \\\dot  \omega
\end{bmatrix} = \begin{bmatrix}
v \\ \omega \\ x \omega^2 - g \sin{\varphi} \\[5pt]
- \dfrac{( m_2x-m_1a)g\cos\varphi - 2m_2xv\omega}
{I_O +m_2x^2}
\end{bmatrix}
\end{gather}

\end{document}


Avoid using align for single equations; also \displaystyle{...} is not the way to go: use \dfrac. The \left and \right you had are not necessary and introduce unwanted spaces.

I propose this more aesthetic (in my opinion) solution: play with extrarowheight in the l.h.s. matrix so the two matrices have the same delimiters heights. A variant uses a medsize fraction (\mfrac command from nccmath) instead of \displaystyle:

\documentclass{article}
\usepackage{mathtools, array, nccmath, bigstrut}

\begin{document}

\begin{align}
{\setlength\extrarowheight{4.5pt}\begin{bmatrix}
\dot x \\\dot φ\\\dot v \\\dot \omega
\end{bmatrix} } & = \begin{bmatrix} %% \vspace{5pt} does not work
v \\ ω\\ x \omega² - g \sin{φ} \\[5pt]
- \dfrac{( m₂x-m₁a )g\cosφ- 2m₂xvω}
{I_O +m₂x²\bigstrut[b]}
\end{bmatrix} \\[6pt]
{\setlength\extrarowheight{4.5pt}\begin{bmatrix}
\dot x \\\dot φ\\\dot v \\\dot \omega
\end{bmatrix} } & = \begin{bmatrix} %% \vspace{5pt} does not work
v \\ ω\\ x \omega² - g \sin{φ} \\[5pt]
- \mfrac{( m₂x-m₁a )g\cosφ- 2m₂xvω}
{I_O +m₂x²\bigstrut[b]}
\end{bmatrix}
\end{align}

\end{document}