\documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{0mm} \usepackage{amsmath,array} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \setlength\arraycolsep{4pt} % default value: 6pt \newcommand\tikzmark[1]{% \tikz[overlay,remember picture,baseline] \coordinate [anchor=base] (#1);} \newcommand\DrawBrace[3]{% \draw [decorate,decoration={brace,amplitude=2pt,mirror,raise=2pt}] (#1) -- (#2) node [black,midway,sloped,yshift=-10pt] {\footnotesize$#3$}; } \begin{document} \begin{preview} \begin{equation*} S^T \cdot A \cdot S = \left( \begin{array}{*{9}{c}} \tikzmark{a}1 \\ & \ddots & \\ & & \tikzmark{b}1 \\ & & & \tikzmark{c}-1 \\ & & & & \ddots & \\ & & & & & \tikzmark{d}-1\\ & & & & & & \tikzmark{e}\phantom{-}0 \\ & & & & & & & \ddots & \\ & & & & & & & & \tikzmark{f}\phantom{-}0 \\ \end{array} \right) \end{equation*} \begin{tikzpicture}[remember picture,overlay] \DrawBrace{a}{b}{r_{+}(s)-mal} \DrawBrace{c}{d}{r_{-}(s)-mal} \DrawBrace{e}{f}{r_{0}(s)-mal} \end{tikzpicture} \end{preview} \end{document}