# Spacing and size of my matrix displays

I am displeased with some of my display in the following equation :

\begin{frame}
\begin{align*}
\left[ \begin{array}{l}
\dfrac{\partial \log L}{\partial b} \\
\dfrac{\partial \log L}{\partial \sigma^2_u}
\end{array}\right]
&=
\left[ \begin{array}{c}
\dfrac{1}{\hat{\sigma}_u^2}X^T(y-X\hat{b}) \\
- \dfrac{T}{2\hat{\sigma}^2_u}+\dfrac{1}{2\hat{\sigma}^4_u}(y-\textbf{X}    \hat{\textbf{b}})^T(y-\textbf{X}\hat{\textbf{b}})
\end{array}\right]
= \left[\begin{array}{l} 0 \\ 0 \end{array} \right]
\end{align*}
\end{frame}


And I have two points of concern :

• I feel there should me a little more spacing between the two lines of my matrices (it is obivious because of $\sigma^2_u$ but even in the first matrix it is too little
• I would like the last matrix to be the same size as the other two

How could I achieve these two things ?

Thanks

One way is to increase the array inter-line space by \renewcommand{\arraystretch}{2.2}.

\documentclass[11pt]{beamer}
\usepackage{lmodern,amsmath}
\begin{document}

\begin{frame}
\begin{equation*}\renewcommand{\arraystretch}{2.2}
\left[ \begin{array}{l}
\dfrac{\partial \log L}{\partial b} \\
\dfrac{\partial \log L}{\partial \sigma^2_u}
\end{array}\right]
=
\left[ \begin{array}{c}
\dfrac{1}{\hat{\sigma}_u^2}X^T(y-X\hat{b}) \\
- \dfrac{T}{2\hat{\sigma}^2_u}+\dfrac{1}{2\hat{\sigma}^4_u}(y-\textbf{X}    \hat{\textbf{b}})^T(y-\textbf{X}\hat{\textbf{b}})
\end{array}\right]
= \left[\begin{array}{l} 0 \\ 0 \end{array} \right]
\end{equation*}
\end{frame}

\end{document} Another (better) option is to use a bmatrix:

\begin{equation*}\renewcommand{\arraystretch}{2.2}
\begin{bmatrix}
\dfrac{\partial \log L}{\partial b} \\
\dfrac{\partial \log L}{\partial \sigma^2_u}
\end{bmatrix}
=
\begin{bmatrix}
\dfrac{1}{\hat{\sigma}_u^2}X^T(y-X\hat{b}) \\
- \dfrac{T}{2\hat{\sigma}^2_u}+\dfrac{1}{2\hat{\sigma}^4_u}(y-\textbf{X}    \hat{\textbf{b}})^T(y-\textbf{X}\hat{\textbf{b}})
\end{bmatrix}
=
\begin{bmatrix}
\ 0\ \\ 0
\end{bmatrix}
\end{equation*} • I was slowly figuring the initial choice of array was part of the problem. Thx for your solution. But don't you find in the second solution that the last matrix is a bit too narrow horizontally ? (I am sorry to be both asking for help and picky) – Anthony Martin Mar 14 '16 at 14:44
• @Aerandal - You can simply change one of the zeros in the last matrix to \ 0 \  to thicken the matrix a bit. – AboAmmar Mar 14 '16 at 15:39