%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%   Semantic Linear Algebra Commands for WMath
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\Arrow}[2]{\overset{\longrightarrow}{#1#2}}
\Annotate[text]{\Arrow}{arrow joining \(#1\) to \(#2\)}
\Annotate[speech]{\Arrow}{arrow joining point \(#1\) to point \(#2\)}
%
\newcommand{\Length}[1]{\mathit{Length}\left(#1\right)}
\Annotate[text]{\Length}{length of arrow \(#1\)}
\Annotate[speech]{\Length}{length of arrow \(#1\)}
%
\newcommand{\Vect}[1]{\mathbf{#1}}
\Annotate[text]{\Vect}{vector \(\mathbf{#1}\)}
\newcommand{\vect}[1]{#1}
\Annotate[text]{\vect}{vector \(#1\)}
\newcommand{\CoordVect}[2]{#1_{\mathcal{#2}}}
\Annotate[text]{\CoordVect}{coordinate vector of \(#1\) with respect to basis \(#2\)}
%
\newcommand{\VSpc}[1]{#1}																	% Vector space
\Annotate[text]{\VSpc}{vector space \(#1\)}
%
\newcommand{\StdBssVec}[1]{\mathbf{e}_{#1}}								% Standardbasis vector
\Annotate[text]{\StdBssVec}{standard basis vector in the \(#1\)-th coordinate direction}
\newcommand{\VSpcBss}[1]{\mathcal{#1}}															% Vector space basis
\Annotate[text]{\VSpcBss}{vector space basis \(\mathcal{#1}\)}
\newcommand{\OrdVSpcBss}[1]{\mathcal{#1}}														% ordered vector space basis
\Annotate[text]{\OrdVSpcBss}{ordered basis \(\mathcal{#1}\)}
%
\newcommand{\RDim}{\mathit{dim}_{\RNr}}										% real dimension
\Annotate[text]{\RDim}{real dimension}
\newcommand{\RDimOf}[1]{\mathit{dim}_{\RNr}\left(#1\right)}	% real dimension of vector space #1
\Annotate[text]{\RDimOf}{real dimension of vector space \(#1\)}
%
\newcommand{\SpanOf}[1]{\mathit{span}\left(#1\right)}								% span of vectors #1
\Annotate[text]{\SpanOf}{span of vectors \(#1\)}
\newcommand{\SpanOfSet}[1]{\mathit{span}\{#1\}}											% span of set of vectors #1
\Annotate[text]{\SpanOfSet}{span of set of vectors \(#1\)}
\newcommand{\SpanOverOf}[2]{\mathit{span}_{#1}\left\{#2\right\}}	% span [over #1] of #2
\Annotate[text]{\SpanOverOf}{span (over field \(#1\)) of \(#2\)}
\newcommand{\RSpan}{\mathit{span}_{\RNr}}
\Annotate[text]{\RSpan}{span over \(\RNr\)}
\newcommand{\RSpanOf}[1]{\mathit{span}_{\RNr}\{#1\}}
\Annotate[text]{\RSpanOf}{\(\RNr\)-span of set of vectors \{#1\}}
%
\newcommand{\ParallelogramOfSet}[1]{P\{#1\}}
\Annotate[text]{\ParallelogramOfSet}{parallelogram spanned by \(\{#1\}\)}
\newcommand{\ParallelepipedOfSet}[1]{P\{#1\}}
\Annotate[text]{\ParallelepipedOfSet}{parallelepiped spanned by \(\{#1\}\)}
\newcommand{\SltdBox}[1]{\mathit{Box}(#1)}
\Annotate[text]{\SltdBox}{slanted box spanned by vectors \(#1\)}
%	Operations
\newcommand{\SclrPr}[2]{#1 \cdot #2}				% scalar product of vector #2 by number #1
\Annotate[text]{\SclrPr}{scalar product of vector \(#2\) by number \( #1\)}
%
\newcommand{\DotPr}[2]{{#1}\hskip .2em \vcenter{\scriptsize{\bullet}}\hskip .2em{#2}}	% Dot prod (#1 by #2)
\Annotate[text]{\DotPr}{dot product of \(#1\) by \(#2\)}
\newcommand{\DotPrVecs}[2]{\mathbf{#1}\hskip .2em \vcenter{\scriptsize{\bullet}}\hskip .2em\mathbf{#2}}
\Annotate[text]{\DotPrVecs}{dot product of \(\mathbf{#1}\) by \(\mathbf{#2}\)}
\newcommand{\InnPr}[2]{\left\langle #1 ,#2\right\rangle}
\Annotate[text]{\InnPr}{inner product of \( #1\) and \( #2\)}
%
\newcommand{\OrthVecs}[2]{#1\bot #2}
\Annotate[text]{\OrthVecs}{\(#1\) is orthogonal to \(#2\)}
\newcommand{\OrthCmplmntOf}[1]{{#1}^{\bot}}
\Annotate[text]{\OrthCmplmntOf}{orthogonal complement of \(#1\)}
\newcommand{\OrthCmplmntOfIn}[2]{{#1}^{\bot}_{#2}}
\Annotate[text]{\OrthCmplmntOfIn}{orthogonal complement of \(#1\) in \(#2\)}
\newcommand{\OrthCmpl}[1]{{#1}^{\bot}}			% Orthogonal complement of #1 (deprecated)
\Annotate[text]{\OrthCmpl}{orthogonal complement of \(#1\)}
%
\newcommand{\CrssPr}[2]{{#1} {\hskip -.2em}\times {\hskip -.2em} {#2}}
\Annotate[text]{\CrssPr}{cross product of \(#1\) by \(#2\)}
\newcommand{\HCrssPr}[1]{\nu_{#1}}
\Annotate[text]{\HCrssPr}{cross product in \(\mathbb{R}^{#1} \)}
\newcommand{\HCrssPrOf}[2]{\nu_{#1}\left( #2 \right)}
\Annotate[text]{\HCrssPrOf}{cross product in \(\mathbb{R}^{#1} \) of \(#2\)}
%
\newcommand{\Vol}{\operatorname{Vol}}				% Volume
\Annotate[text]{\Vol}{volume}
\newcommand{\Ori}[1][]{\mathit{Ori}_{#1}}		% Orientation of #1
\Annotate[text]{\Ori}{orientation of \(#1\)}
\newcommand{\OriVol}{\operatorname{OVol}} 	% Oriented Volume
\Annotate[text]{\OriVol}{oriented Volume}
%
\newcommand{\LinMap}[1]{#1}										% linear map
\Annotate[text]{\LinMap}{linear map \(#1\)}
\newcommand{\LinMapOf}[2]{#1\left(#2\right)}	% linear map #1 applied to #2
\Annotate[text]{\LinMapOf}{linear map \(#1\) applied to vector \(#2\)}
\newcommand{\LinMaps}[2]{\mathit{Lin}\left(#1,#2\right)}	% Lin(#1,#2)
\Annotate[text]{\LinMaps}{space of linear maps from \(#1\) to \(#2\)}
\newcommand{\MLinMaps}[3]{\mathit{Lin}^{#1}\left(#2,#3\right)}
\Annotate[text]{\MLinMaps}{space of \( #1\)-linear maps from \(#2\) to \(#3\)}
\newcommand{\IdTrafo}[1]{\mathit{Id}_{#1}}  % Identity Transformation of R^#1
\Annotate[text]{\IdTrafo}{identity transformation of \(#1\)}
\newcommand{\ZTrafo}[1]{\mathit{0}_{#1}}  	% 0-Transformation of R^#1
\Annotate[text]{\ZTrafo}{0-transformation of \(#1\)}
\newcommand{\OrthoPrjctn}[1]{\mathit{proj}_{#1}}
\Annotate[text]{\OrthoPrjctn}{orthogonal projection onto \(#1\)}
\newcommand{\OrthoPrjctnOf}[2]{\mathit{proj}_{#1}(#2)}
\Annotate[text]{\OrthoPrjctnOf}{orthogonal projection of \( #2\) onto \(#1\)}
%
\newcommand{\LinMtnOf}[2]{{#1}(#2)}					% Linear motion #1 at time #2
\Annotate[text]{\LinMtnOf}{linear motion \(#1\) at time \(#2\)}
\Annotate[speech]{\LinMtnOf}{linear motion \(#1\) at time \(#2\)}
\newcommand{\LinMtn}[1]{#1}									% Linear motion #1
\Annotate[text]{\LinMtn}{linear motion \(#1\)}
\Annotate[speech]{\LinMtn}{linear motion \(#1\)}
% Matrix concepts
\newcommand{\Mtrx}[1]{#1}                 	% Symbol representing a matrix
\Annotate[text]{\Mtrx}{matrix \(#1\)}
\newcommand{\MMtrx}[1]{\left[ #1 \right]}		% matrix #1 (code the array, not the brackets)
\Annotate[text]{\MMtrx}{matrix}
\newcommand{\MtrxSpc}[2]{M_{#1,#2}}
\Annotate[text]{\MtrxSpc}{space of matrices of size \((#1,#2)\)}
\newcommand{\MtrxSpcOver}[3]{M_{#1,#2}\left(#3\right)}
\Annotate[text]{\MtrxSpcOver}{space of matrices of size \((#1,#2)\) over \(#3\)}
%
\newcommand{\IdMtrx}[1]{\mathit{Id}_{#1}}	% Identity matrix of size #1
\Annotate[text]{\IdMtrx}{identity matrix of size \(#1\)}
\newcommand{\ZMtrx}[1]{\mathbf{0}_{#1}}			% 0-Matrix of size #1
\Annotate[text]{\ZMtrx}{0-matrix of size \(#1\)}
\newcommand{\MtrxPrdct}[2]{#1\cdot #2}			% product of matrix #1 by matrix #2
\Annotate[text]{\MtrxPrdct}{product of matrix \( #1\) by matrix \(#2\)}
\newcommand{\MtrxInvrs}[1]{#1^{-1}}					% inverse of matrix #1
\Annotate[text]{\MtrxInvrs}{inverse of matrix \(#1\)}
\newcommand{\MtrxTrnsps}[1]{#1^T}						% transpose of matrix #1
\Annotate[text]{\MtrxTrnsps}{transpose of matrix \(#1\)}
\newcommand{\MtrxDelSub}[3]{#1_{#2#3}}			% #2#3-deleted submatrix of matrix #1
\Annotate[text]{\MtrxDelSub}{\( (#2,#3) \)-deleted submatrix of matrix \(#1\)}
\newcommand{\MtrxMinor}[3]{M_{#2#3}(#1)}			% #2#3-deleted submatrix of matrix #1
\Annotate[text]{\MtrxMinor}{\( (#2,#3) \)-minor of matrix \(#1\)}
\newcommand{\MtrxCoFactor}[3]{c_{#2#3}(#1)}	% cofactor of matrix #1 in position #2#3
\Annotate[text]{\MtrxCoFactor}{cofactor of matrix \(#1\) in position \(#2#3\)}
\Annotate[speech]{\MtrxCoFactor}{cofactor of matrix \(#1\) in position \(#2#3\)}
\newcommand{\RowSpc}[1]{\mathit{Row}(#1)}
\Annotate[text]{\RowSpc}{row space of a matrix \( #1\)}
\newcommand{\ColSpc}[1]{\mathit{Col}(#1)}
\Annotate[text]{\ColSpc}{column space of a matrix \( #1\)}
\newcommand{\NullSpc}[1]{\mathit{Null}(#1)}
\Annotate[text]{\NullSpc}{null space of matrix \(#1\)}
\newcommand{\Rnk}[1]{\mathit{Rank}(#1)}						% deprecated
\Annotate[text]{\Rnk}{rank of matrix \(#1\)}				% deprecated
\newcommand{\RnkOf}[1]{\mathit{Rank}(#1)}					% deprecated
\Annotate[text]{\RnkOf}{rank of matrix \(#1\)}				% deprecated
\newcommand{\Rank}{\mathit{Rank}}
\Annotate[text]{\Rank}{rank of matrix \(#1\)}
\newcommand{\RankOf}[1]{\mathit{Rank}(#1)}
\Annotate[text]{\RankOf}{rank of matrix \(#1\)}
\newcommand{\CoordTrafoMtrx}[3]{#1_{\mathcal{#2}\leftarrow \mathcal{#3}}}
\Annotate[text]{\CoordTrafoMtrx}{coordinate transformation matrix from \(#3\)-coordinates to \(#2\)-coordinates}
%
\newcommand{\LinMapMtrx}[3]{#1_{\mathcal{#2}\leftarrow\mathcal{#3}}}	% matrix representing lin map #1 from  #3 coords to #2 coords
\Annotate[text]{\LinMapMtrx}{matrix \(#1\) representing given linear map with respect to \(#3\)-coordinates of the domain to \(#2\)-coordinates of the target}
\newcommand{\LinMapMtrxOf}[4]{#1^{#2}_{\mathcal{#3}\leftarrow\mathcal{#4}}}	
\Annotate[text]{\LinMapMtrxOf}{matrix \(#1\) representing linear map \(#2\) with respect to \(#4\)-coordinates of the domain to \(#3\)-coordinates of the target}
\newcommand{\LinMaps}[2]{\mathit{Lin}\left( #1 , #2 \right) }
\Annotate[text]{\LinMaps}{space of linear maps from \( #1\) to \( #2 \)}

\newcommand{\LinMapMtrxx}[1]{\left[#1\right]}
\Annotate[text]{\LinMapMtrxx}{matrix representing \(#1\)}
\newcommand{\LinMapMtrxxOnBss}[3]{\left[#1\right]_{\EuScript{#2}\leftarrow \EuScript{#3}}}	% Mtrx representing lin map #1 from basis #3 to #2
\Annotate[text]{\LinMapMtrxxOnBss}{matrix representing \(#1\) wrt bases \(#2\) and \(#3\)}
%
\newcommand{\Dtrmnnt}{\mathit{det}}
\Annotate[text]{\Dtrmnnt}{determinant}
\newcommand{\DtrmnntOf}[1]{\mathit{det}(#1)}
\Annotate[text]{\DtrmnntOf}{determinant of matrix \(#1\)}
\newcommand{\DtrmnntOfMtrx}[1]{\mathit{det}#1}
\Annotate[text]{\DtrmnntOfMtrx}{determinant of matrix \(#1\)}
\newcommand{\Trace}{\mathit{tr}}
\Annotate[text]{\Trace}{trace}
\newcommand{\TraceOf}[1]{\mathit{tr}(#1)}
\Annotate[text]{\TraceOf}{trace of \(#1\)}
\newcommand{\Trc}[1]{\mathit{tr}(#1)}   		% deprecated
\Annotate[text]{\Trc}{trace of \(#1\)}			% deprecated
\newcommand{\trc}[1]{\mathit{tr}(#1)}   		% deprecated
\Annotate[text]{\trc}{trace}					% deprecated
% end Matrix concepts
%
\newcommand{\EigenVal}[1]{#1}
\Annotate[text]{\EigenVal}{\(#1\) is an eigenvalue}
\newcommand{\CharPoly}[1]{#1}
\Annotate[text]{\CharPoly}{characteristic polynomial \(#1\)}
\newcommand{\CharPolyOf}[2]{#1(#2)}
\Annotate[text]{\CharPolyOf}{characteristic polynomial \(#1\) of \(#2\)}
\newcommand{\AlgbrcMltplcty}[1]{a(#1)}
\Annotate[text]{\AlgbrcMltplcty}{algebraic multiplicity of eigenvalue \(#1\)}
\newcommand{\GmtrcMltplcty}[1]{g(#1)}
\Annotate[text]{\GmtrcMltplcty}{geometric multiplicity of eigenvalue \(#1\)}
\newcommand{\EigenSpc}[1]{E\left(#1\right)}
\Annotate[text]{\EigenSpc}{eigenspace associated to eigenvalue \(#1\)}
%
%
% Complex Linear Algebra
%
%
\newcommand{\CCnjgtVect}[1]{\overline{#1}}
\Annotate[text]{\CCnjgtVect}{complex conjugate of vector \(#1\)}
\newcommand{\CCnjgtMtrx}[1]{\overline{#1}}
\Annotate[text]{\CCnjgtMtrx}{complex conjugate of matrix \(#1\)}
\newcommand{\CMtrxCnjgtTrnsps}[1]{{#1}^{\ast}}
\Annotate[text]{\CMtrxCnjgtTrnsps}{complex conjugate transpose of matrix \(#1\)}
%
\newcommand{\CLnrMp}[1]{#1}
\Annotate[text]{\CLnrMp}{complex linear function \(#1\)}
\newcommand{\CLnrMpOf}[2]{#1\left(#2\right)}
\Annotate[text]{\CLnrMpOf}{complex linear function \(#1\), evaluated at \(#2\)}
%
\newcommand{\CSpan}{\mathit{span}_{\hspace{.1em}\CNr}}
\Annotate[text]{\CSpan}{span over \(\CNr\)}
\newcommand{\CSpanOf}[1]{\mathit{span}_{\hspace{.1em}\CNr}\{#1\}}
\Annotate[text]{\CSpanOf}{\(\CNr\)-span of set of vectors \{#1\}}
\newcommand{\CDim}{\mathit{dim}_{\CNr}}
\Annotate[text]{\CDim}{complex dimension}
\newcommand{\CDimOf}[1]{\mathit{dim}_{\CNr}\left(#1\right)}
\Annotate[text]{\CDimOf}{complex dimension of vector space \(#1\)}
%
%
%deprecated
%
%
\newcommand{\Rdim}{\mathit{dim}_{\RNr}}										% real dimension
\newcommand{\Cdim}{\mathit{dim}_{\CNr}}										% complex dimension
\newcommand{\span}{\mathit{span}}											% span of a set of vectors
\newcommand{\Rspan}{\mathit{span}_{\RNr}}									% R-span
\newcommand{\Cspan}{\mathit{span}_{\hspace{.1em}\CNr}}		% C-span
