forked from MartinThoma/LaTeX-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
math-sylvester-diagonal-matrix.tex
45 lines (38 loc) · 1.06 KB
/
math-sylvester-diagonal-matrix.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
\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}