# Need to represent information about a matrix, attached image showing what is needed [duplicate]

The following matrix is of size $10 \times 10$, however it is representing an $m \times m$ matrix. Hence I need to signify that the first five columns represent terms $0$ to $\frac{m}{2} - 1$ and the second five columns represent terms $\frac{m}{2}$ to $m$. I have an attached an image of what I need to represent.

\documentclass[a4paper,12pt,times,numbered,print,index]{article}
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
\RequirePackage{libertine}
\RequirePackage[small,bf,labelsep=space,
tableposition=top]{caption}
\usepackage{multirow}
\usepackage{subfig,amsfonts,amsmath,amssymb,braket}
\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx

\begin{document}

$$H_{ab}= \begin{bmatrix} 1 & 1 & 0 & \dots & \dots & 0 & 0 & 0 & \dots & 0 \\ 0 & 0 & 0 & \dots & \dots & 1 & -1 & 0 & \dots & \vdots \\ \vdots & \dots & \dots & \dots & \dots & 0 & 0 & 0 & \dots & \vdots \\ \vdots & \dots & \dots & \dots & \dots & \dots & \dots & \dots & \dots & \vdots \\ 0 & \dots & \dots & \dots & \dots & \dots & \dots & \dots & \dots & 0 \\ \end{bmatrix}$$
\end{document}


Does anyone have any idea how I could represent this in LaTeX? If it is not possible to get it to display exactly like in the image I don't mind, I am just looking for a way to represent th e information in the image as clearly as possible. Anyone know how to accomplish this?

## marked as duplicate by Peter Grill, Heiko Oberdiek, egreg, Werner, percusseApr 5 '14 at 17:43

• – Werner Apr 5 '14 at 17:53

This is just a manual placement of the respective braces in a nested array:

\documentclass{article}
\usepackage{amsmath,amssymb,array,graphicx}
\newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}}

\begin{document}

$\begin{array}{@{}r@{}} \overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}} &&&& \end{array}}^{\text{Columns: 0 to m/2-1}} \overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}} &&&& \end{array}}^{\text{Columns: m/2 to m}} \hspace*{25pt}\\[-.5\normalbaselineskip] H_{ab} = \left.\hspace*{-\nulldelimiterspace} \left[\begin{array}{@{}*{10}{C{1.5em}}@{}} 1 & 1 & 0 & \cdots & \cdots & 0 & 0 & 0 & \cdots & 0 \\ 0 & 0 & 0 & \cdots & \cdots & 1 & -1 & 0 & \cdots & \vdots \\ \vdots & \cdots & \cdots & \cdots & \cdots & 0 & 0 & 0 & \cdots & \vdots \\ \vdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \vdots \\ 0 & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & 0 \\ \end{array}\right]\right\} \rotatebox[origin=c]{-90}{\scriptsize Rows: 0 to m} \end{array}$
\end{document}

• ...had been working on this for 10 minutes after I saw the duplicate. :-| – Werner Apr 5 '14 at 17:36
• Appreciate it, very nice! – sonicboom Apr 5 '14 at 18:23