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 reduced row-echelon form of its argument, a matrix.
93 \newcommand*
{\rref}[1]{\operatorname{rref
}\of{#1}}
94 \ifdefined\newglossaryentry
95 \newglossaryentry{rref
}{
96 name=
{\ensuremath{\rref{A
}}},
97 description=
{the reduced row-echelon form of $A$
},
102 % The ``Automorphism group of'' operator.
103 \newcommand*
{\Aut}[1]{ \operatorname{Aut
}\of{{#1}} }
105 % The ``Lie algebra of'' operator.
106 \newcommand*
{\Lie}[1]{ \operatorname{Lie
}\of{{#1}} }
108 % The ``write a matrix as a big vector'' operator.
109 \newcommand*
{\vectorize}[1]{ \operatorname{vec
}\of{{#1}} }
111 % The ``write a big vector as a matrix'' operator.
112 \newcommand*
{\matricize}[1]{ \operatorname{mat
}\of{{#1}} }
114 % An inline column vector, with parentheses and a transpose operator.
115 \newcommand*
{\colvec}[1]{ \transpose{\left(
{#1}\right)
} }
117 % Bounded linear operators on some space. The required argument is the
118 % domain of those operators, and the optional argument is the
119 % codomain. If the optional argument is omitted, the required argument
121 \newcommand*
{\boundedops}[2][]{
123 \if\relax\detokenize{#1}\relax
133 % Orthogonal direct sum.
135 % First declare my ``perp in a circle'' operator, which is meant to be
136 % like an \obot or an \operp except has the correct weight circle. It's
137 % achieved by overlaying an \ocircle with a \perp, but only after we
138 % clip off the top half of the \perp sign and shift it up.
139 \DeclareMathOperator{\oplusperp}{\mathbin{
142 \raisebox{0.625\height}{$
\clipbox{0pt
0pt
0pt
0.5\height}{$
\perp$
}$
}\cr
146 % Now declare an orthogonal direct sum in terms of \oplusperp.
147 \newcommand*
{\directsumperp}[2]{ {#1}\oplusperp{#2} }
150 % The space of real symmetric n-by-n matrices. Does not reduce to
151 % merely "S" when n=1 since S^{n} does not mean an n-fold cartesian
153 \newcommand*
{\Sn}[1][n
]{ \mathcal{S
}^
{#1} }
154 \ifdefined\newglossaryentry
155 \newglossaryentry{Sn
}{
156 name=
{\ensuremath{\Sn}},
157 description=
{the set of $n$-by-$n$ real symmetric matrices
},
162 % The space of complex Hermitian n-by-n matrices. Does not reduce to
163 % merely "H" when n=1 since H^{n} does not mean an n-fold cartesian
164 % product of H^{1}. The field may also be given rather than assumed
165 % to be complex; for example \Hn[3]\of{\mathbb{O}} might denote the
166 % 3-by-3 Hermitian matrices with octonion entries.
167 \newcommand*
{\Hn}[1][n
]{ \mathcal{H
}^
{#1} }
168 \ifdefined\newglossaryentry
169 \newglossaryentry{Hn
}{
170 name=
{\ensuremath{\Hn}},
171 description=
{the set of $n$-by-$n$ complex Hermitian matrices
},