# Notation for multivariate normal

I would like to find a good notation and LaTeX way to depict a multivariate normal with a specific covariance matrix (ie. not a generic sigma). Here is my attempt, which compiles but does not look very pretty (although I do not know why specifically). Is there a better or more conventional way?

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsmath}
\usepackage{babel}
\begin{document}

\begin{eqnarray*}
\begin{pmatrix}W_{1}\\
W_{2}\\
\epsilon
\end{pmatrix} & \sim & N\left[\left(\begin{array}{c}
0\\
0\\
0
\end{array}\right),\left(\begin{array}{ccc}
3 & d & d\\
d & 1 & d\\
d & d & 1
\end{array}\right)\right]\\
Z & = & W_{1}^{3}+\epsilon
\end{eqnarray*}

\end{document}


It compiles as follows: • Do you know smallmatrix? It could help you. – Sigur Jun 1 '14 at 0:51
• Comment aside: don't use eqnarray; it should be replaced with alignfrom amsmath. The latter has a better horizontal spacing, and a simpler syntax. – Bernard Jun 1 '14 at 1:02
• @Sigur I did not know about smallmatrix. I will explore it. – Xu Wang Jun 2 '14 at 1:35
• @Bernard Thank you for your advice. I will follow it. – Xu Wang Jun 2 '14 at 1:35

## 1 Answer

Don't use eqnarray.

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{align*}
\begin{pmatrix}W_{1}\\
W_{2}\\
\epsilon
\end{pmatrix} &\sim  N
\begin{bmatrix}
\begin{pmatrix}
0\\
0\\
0
\end{pmatrix}\!\!,&
\begin{pmatrix}
3 & d & d\\
d & 1 & d\\
d & d & 1
\end{pmatrix}
\end{bmatrix}\\[2\jot]
Z &=  W_{1}^{3}+\epsilon
\end{align*}

\end{document} 