[Tex/LaTex] \bmatrix enviroment, vertical spacing of the first entry

matricesvertical alignment

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.

Best Answer

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}

enter image description here

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.