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