]> gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-linear_algebra.tex
Wrap all mjotex files in conditionals to prevent double-loading.
[mjotex.git] / mjo-linear_algebra.tex
1 %
2 % Standard operations from linear algebra.
3 %
4 \ifx\havemjolinearalgebra\undefined
5 \def\havemjolinearalgebra{1}
6
7
8 % Needed for \lvert, \rVert, etc. and \operatorname.
9 \usepackage{amsmath}
10
11 % Wasysym contains the \ocircle that we use in \directsumperp.
12 \usepackage{wasysym}
13
14 % Part of the adjustbox package; needed to clip the \perp sign.
15 \usepackage{trimclip}
16
17 \input{mjo-common}
18
19 % Absolute value (modulus) of a scalar.
20 \newcommand*{\abs}[1]{\left\lvert{#1}\right\rvert}
21
22 % Norm of a vector.
23 \newcommand*{\norm}[1]{\left\lVert{#1}\right\rVert}
24
25 % The inner product between its two arguments.
26 \newcommand*{\ip}[2]{\left\langle{#1},{#2}\right\rangle}
27
28 % The tensor product of its two arguments.
29 \newcommand*{\tp}[2]{ {#1}\otimes{#2} }
30
31 % The Kronecker product of its two arguments. The usual notation for
32 % this is the same as the tensor product notation used for \tp, but
33 % that leads to confusion because the two definitions may not agree.
34 \newcommand*{\kp}[2]{ {#1}\odot{#2} }
35
36 % The adjoint of a linear operator.
37 \newcommand*{\adjoint}[1]{ #1^{*} }
38
39 % The ``transpose'' of a linear operator; namely, the adjoint, but
40 % specialized to real matrices.
41 \newcommand*{\transpose}[1]{ #1^{T} }
42
43 % The Moore-Penrose (or any other, I guess) pseudo-inverse of its
44 % sole argument.
45 \newcommand*{\pseudoinverse}[1]{ #1^{+} }
46
47 % The trace of an operator.
48 \newcommand*{\trace}[1]{ \operatorname{trace}\of{{#1}} }
49
50 % The ``span of'' operator. The name \span is already taken.
51 \newcommand*{\spanof}[1]{ \operatorname{span}\of{{#1}} }
52
53 % The ``co-dimension of'' operator.
54 \newcommand*{\codim}{ \operatorname{codim} }
55
56 % The orthogonal projection of its second argument onto the first.
57 \newcommand*{\proj}[2] { \operatorname{proj}\of{#1, #2} }
58
59 % The ``Automorphism group of'' operator.
60 \newcommand*{\Aut}[1]{ \operatorname{Aut}\of{{#1}} }
61
62 % The ``Lie algebra of'' operator.
63 \newcommand*{\Lie}[1]{ \operatorname{Lie}\of{{#1}} }
64
65 % The ``write a matrix as a big vector'' operator.
66 \newcommand*{\vectorize}[1]{ \operatorname{vec}\of{{#1}} }
67
68 % The ``write a big vector as a matrix'' operator.
69 \newcommand*{\matricize}[1]{ \operatorname{mat}\of{{#1}} }
70
71 % An inline column vector, with parentheses and a transpose operator.
72 \newcommand*{\colvec}[1]{ \transpose{\left({#1}\right)} }
73
74 % Bounded linear operators on some space. The required argument is the
75 % domain of those operators, and the optional argument is the
76 % codomain. If the optional argument is omitted, the required argument
77 % is used for both.
78 \newcommand*{\boundedops}[2][]{
79 \mathcal{B}\of{ {#2}
80 \if\relax\detokenize{#1}\relax
81 {}%
82 \else
83 {,{#1}}%
84 \fi
85 }
86 }
87
88
89 %
90 % Orthogonal direct sum.
91 %
92 % First declare my ``perp in a circle'' operator, which is meant to be
93 % like an \obot or an \operp except has the correct weight circle. It's
94 % achieved by overlaying an \ocircle with a \perp, but only after we
95 % clip off the top half of the \perp sign and shift it up.
96 \DeclareMathOperator{\oplusperp}{\mathbin{
97 \ooalign{
98 $\ocircle$\cr
99 \raisebox{0.625\height}{$\clipbox{0pt 0pt 0pt 0.5\height}{$\perp$}$}\cr
100 }
101 }}
102
103 % Now declare an orthogonal direct sum in terms of \oplusperp.
104 \newcommand*{\directsumperp}[2]{ {#1}\oplusperp{#2} }
105
106
107 \fi