2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 14:28:05 +02:00
LaTeX-examples/documents/math-sylvester-diagonal-matrix/math-sylvester-diagonal-matrix.tex

46 lines
1.1 KiB
TeX
Raw Normal View History

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
2012-08-30 14:56:42 +02:00
\setlength\PreviewBorder{0mm}
\usepackage{amsmath,array}
2012-09-02 20:39:52 +02:00
\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*}
2012-09-02 20:39:52 +02:00
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*}
2012-09-02 20:39:52 +02:00
\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}