2 % Standard operations from linear algebra.
4 \ifx\havemjolinearalgebra\undefined
5 \def\havemjolinearalgebra{1}
9 \usepackage{amsmath
} % \lvert, \rVert, etc. and \operatorname.
12 \ifx\ocircle\undefined
16 \ifx\clipbox\undefined
17 % Part of the adjustbox package; needed to clip the \perp sign.
21 \input{mjo-common
} % for \of, at least
23 % Absolute value (modulus) of a scalar.
24 \newcommand*
{\abs}[1]{\left\lvert{#1}\right\rvert}
27 \newcommand*
{\norm}[1]{\left\lVert{#1}\right\rVert}
29 % The inner product between its two arguments.
30 \newcommand*
{\ip}[2]{\left\langle{#1},
{#2}\right\rangle}
32 % The tensor product of its two arguments.
33 \newcommand*
{\tp}[2]{ {#1}\otimes{#2} }
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} }
40 % The adjoint of a linear operator.
41 \newcommand*
{\adjoint}[1]{ #1^
{*
} }
43 % The ``transpose'' of a linear operator; namely, the adjoint, but
44 % specialized to real matrices.
45 \newcommand*
{\transpose}[1]{ #1^
{T
} }
47 % The Moore-Penrose (or any other, I guess) pseudo-inverse of its
49 \newcommand*
{\pseudoinverse}[1]{ #1^
{+
} }
51 % The trace of an operator.
52 \newcommand*
{\trace}[1]{ \operatorname{trace
}\of{{#1}} }
54 % The diagonal matrix whose only nonzero entries are on the diagonal
55 % and are given by our argument. The argument should therefore be a
56 % vector or tuple of entries, by convention going from the top-left to
57 % the bottom-right of the matrix.
58 \newcommand*
{\diag}[1]{\operatorname{diag
}\of{{#1}}}
60 % The "rank" of its argument, which is context-dependent. It can mean
63 % * the rank of a matrix,
64 % * the rank of a power-associative algebra (particularly an EJA),
65 % * the rank of an element in a Euclidean Jordan algebra.
67 \newcommand*
{\rank}[1]{ \operatorname{rank
}\of{{#1}} }
70 % The ``span of'' operator. The name \span is already taken.
71 \newcommand*
{\spanof}[1]{ \operatorname{span
}\of{{#1}} }
73 % The ``co-dimension of'' operator.
74 \newcommand*
{\codim}{ \operatorname{codim
} }
76 % The orthogonal projection of its second argument onto the first.
77 \newcommand*
{\proj}[2] { \operatorname{proj
}\of{#1,
#2} }
79 % The set of all eigenvalues of its argument, which should be either a
80 % matrix or a linear operator. The sigma notation was chosen instead
81 % of lambda so that lambda can be reserved to denote the ordered tuple
82 % (largest to smallest) of eigenvalues.
83 \newcommand*
{\spectrum}[1]{\sigma\of{{#1}}}
84 \ifdefined\newglossaryentry
85 \newglossaryentry{spectrum
}{
86 name=
{\ensuremath{\spectrum{L
}}},
87 description=
{the set of all eigenvalues of $L$
},
92 % The ``Automorphism group of'' operator.
93 \newcommand*
{\Aut}[1]{ \operatorname{Aut
}\of{{#1}} }
95 % The ``Lie algebra of'' operator.
96 \newcommand*
{\Lie}[1]{ \operatorname{Lie
}\of{{#1}} }
98 % The ``write a matrix as a big vector'' operator.
99 \newcommand*
{\vectorize}[1]{ \operatorname{vec
}\of{{#1}} }
101 % The ``write a big vector as a matrix'' operator.
102 \newcommand*
{\matricize}[1]{ \operatorname{mat
}\of{{#1}} }
104 % An inline column vector, with parentheses and a transpose operator.
105 \newcommand*
{\colvec}[1]{ \transpose{\left(
{#1}\right)
} }
107 % Bounded linear operators on some space. The required argument is the
108 % domain of those operators, and the optional argument is the
109 % codomain. If the optional argument is omitted, the required argument
111 \newcommand*
{\boundedops}[2][]{
113 \if\relax\detokenize{#1}\relax
123 % Orthogonal direct sum.
125 % First declare my ``perp in a circle'' operator, which is meant to be
126 % like an \obot or an \operp except has the correct weight circle. It's
127 % achieved by overlaying an \ocircle with a \perp, but only after we
128 % clip off the top half of the \perp sign and shift it up.
129 \DeclareMathOperator{\oplusperp}{\mathbin{
132 \raisebox{0.625\height}{$
\clipbox{0pt
0pt
0pt
0.5\height}{$
\perp$
}$
}\cr
136 % Now declare an orthogonal direct sum in terms of \oplusperp.
137 \newcommand*
{\directsumperp}[2]{ {#1}\oplusperp{#2} }
140 % The space of real symmetric n-by-n matrices. Does not reduce to
141 % merely "S" when n=1 since S^{n} does not mean an n-fold cartesian
143 \newcommand*
{\Sn}[1][n
]{ \mathcal{S
}^
{#1} }
144 \ifdefined\newglossaryentry
145 \newglossaryentry{Sn
}{
146 name=
{\ensuremath{\Sn}},
147 description=
{the set of $n$-by-$n$ real symmetric matrices
},
152 % The space of complex Hermitian n-by-n matrices. Does not reduce to
153 % merely "H" when n=1 since H^{n} does not mean an n-fold cartesian
154 % product of H^{1}. The field may also be given rather than assumed
155 % to be complex; for example \Hn[3]\of{\mathbb{O}} might denote the
156 % 3-by-3 Hermitian matrices with octonion entries.
157 \newcommand*
{\Hn}[1][n
]{ \mathcal{H
}^
{#1} }
158 \ifdefined\newglossaryentry
159 \newglossaryentry{Hn
}{
160 name=
{\ensuremath{\Hn}},
161 description=
{the set of $n$-by-$n$ complex Hermitian matrices
},