[Tex/LaTex] Produce matrix with labels underneath

matrices

Sorry if this has been asked before, I am trying to produce a matrix that appears as in the linked image. In particular, I am wondering how to get the labels on the top and bottom of the matrices, as well as the dots indicating continuation in the matrix contents

enter image description here

Best Answer

If not closed, then this might as well have an answer. Here are a few ways of producing, for example, the second matrix above:

\documentclass{article}
\usepackage{blkarray}
\usepackage{amsmath}
\begin{document}
\[
\begin{blockarray}{ccc}
     & U &\\
    \begin{block}{[ccc]}
        u_{1,1} & \cdots & u_{1,r}\\
        \vdots  & \ddots & \vdots\\
        u_{m,1} & \cdots & u_{m,r}\\
   \end{block}
    & m\times r& \\
\end{blockarray}
\]
\[
\begin{array}{c}
    U\\
    \left[\begin{array}{ccc}
        u_{1,1} & \cdots & u_{1,r}\\
        \vdots  & \ddots & \vdots\\
        u_{m,1} & \cdots & u_{m,r}\\
    \end{array}\right]\\
    m\times r
\end{array}
\]
\[  
\begin{array}{c}
    U\\
    \begin{bmatrix}
        u_{1,1} & \cdots & u_{1,r}\\
        \vdots  & \ddots & \vdots\\
        u_{m,1} & \cdots & u_{m,r}\\
    \end{bmatrix}\\
    m\times r
\end{array}
\]

Which give, respectively:

enter image description here

To my eye, the third option produces the best spacing. However, the second two methods work only by virtue of the underset and overset text being in the center column. If it were in a different column, then the first method might be modified to give better spacing, or one of the answers linked in the comments might be preferable.

Related Question