I would like to typeset the following matrix:

However, I don't know how to achieve the braces and the dots leading to the matrix entry.
I would like to typeset the following matrix:

However, I don't know how to achieve the braces and the dots leading to the matrix entry.
Example:
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{mleftright}
\begin{document}
\[
\Phi =
\begin{tabular}{@{}c@{}}
\rotatebox[origin=c]{90}{$\scriptstyle\text{states}$}
\end{tabular}
\mleft\{
\vphantom{%
\begin{bmatrix}
\vdots \\
\phi_{iy} \\
\vdots
\end{bmatrix}
}%
\mright.\kern-\nulldelimiterspace
j % \,
\overbrace{%
\mathop{%
\!
\begin{bmatrix}
\vdots \\
\cdots \phi_{iy} \hphantom{\cdots} \\
\vphantom{\vdots}
\end{bmatrix}
\!
}\limits^{\smash{\textstyle y}}
}^{\text{aggr. states}}
\]
\end{document}
Remarks:
bmatrix of package amsmath that automatically sets the brackets.\text of package amsmath (or amstext) sets text in text mode (automatically resized).\mleft and \mright of package mleftright avoid the additional surrounding space of \left and \right.\vphantom creates an emtpy box with width zero, but the height and depth of its argument. Thus the left brace only covers the matrix, not the stuff above.\right. is an invisible right delimiter. TeX inserts the space \nulldelimiterspace, thus \kern-\nulldelimiterspace removes the space.\begin{tabular}{@{}c@{}}...\end{tabular} is a trick to center the box around the math axis. (Internally \vcenter is used.)\! before and after the matrix. A \, could be inserted after j to keep the space to the matrix constant. But I have commented it, because a smaller distance looks better IMHO.\scriptstyle command, can you what this command does?
– Red
Aug 23 '13 at 15:17
\displaystyle is used for displayed equations, \textstyle for inline math, but with the same sizes. The next smaller size is \scriptstyle, used in sub- and superscripts. In case of further nesting, \scriptscriptstyle is the smallest math style.
– Heiko Oberdiek
Aug 23 '13 at 15:23
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx} %for the \rotatebox command
\begin{document}
\[
\setbox0=\hbox{
$\begin{array}{c}
y\\
j\begin{bmatrix}
& \vdots & \\
\cdots & \Phi_{jy} & \\
& & \\
\end{bmatrix}
\end{array}$
}
\Phi = \text{\rotatebox[origin=c]{90}{states}}\left\{\vphantom{\usebox0}\right.\kern-\nulldelimiterspace\overbrace{\usebox0}^\text{aggr. states}
\]
\end{document}
