$
\newcommand{\Ua}{\mathrm{a}}
\newcommand{\Ub}{\mathrm{b}}
\newcommand{\Uc}{\mathrm{c}}
\newcommand{\Ud}{\mathrm{d}}
\newcommand{\Ue}{\mathrm{e}}
\newcommand{\Uf}{\mathrm{f}}
\newcommand{\Ug}{\mathrm{g}}
\newcommand{\Uh}{\mathrm{h}}
\newcommand{\Ui}{\mathrm{i}}
\newcommand{\Uj}{\mathrm{j}}
\newcommand{\Uk}{\mathrm{k}}
\newcommand{\Ul}{\mathrm{l}}
\newcommand{\Um}{\mathrm{m}}
\newcommand{\Un}{\mathrm{n}}
\newcommand{\Uo}{\mathrm{o}}
\newcommand{\Up}{\mathrm{p}}
\newcommand{\Uq}{\mathrm{q}}
\newcommand{\Ur}{\mathrm{r}}
\newcommand{\Us}{\mathrm{s}}
\newcommand{\Ut}{\mathrm{t}}
\newcommand{\Uu}{\mathrm{u}}
\newcommand{\Uv}{\mathrm{v}}
\newcommand{\Uw}{\mathrm{w}}
\newcommand{\Ux}{\mathrm{x}}
\newcommand{\Uy}{\mathrm{y}}
\newcommand{\Uz}{\mathrm{z}}
\newcommand{\UA}{\mathrm{A}}
\newcommand{\UB}{\mathrm{B}}
\newcommand{\UC}{\mathrm{C}}
\newcommand{\UD}{\mathrm{D}}
\newcommand{\UE}{\mathrm{E}}
\newcommand{\UF}{\mathrm{F}}
\newcommand{\UG}{\mathrm{G}}
\newcommand{\UH}{\mathrm{H}}
\newcommand{\UI}{\mathrm{I}}
\newcommand{\UJ}{\mathrm{J}}
\newcommand{\UK}{\mathrm{K}}
\newcommand{\UL}{\mathrm{L}}
\newcommand{\UM}{\mathrm{M}}
\newcommand{\UN}{\mathrm{N}}
\newcommand{\UO}{\mathrm{O}}
\newcommand{\UP}{\mathrm{P}}
\newcommand{\UQ}{\mathrm{Q}}
\newcommand{\UR}{\mathrm{R}}
\newcommand{\US}{\mathrm{S}}
\newcommand{\UT}{\mathrm{T}}
\newcommand{\UU}{\mathrm{U}}
\newcommand{\UV}{\mathrm{V}}
\newcommand{\UW}{\mathrm{W}}
\newcommand{\UX}{\mathrm{X}}
\newcommand{\UY}{\mathrm{Y}}
\newcommand{\UZ}{\mathrm{Z}}
%
\newcommand{\Uzero }{\mathrm{0}}
\newcommand{\Uone }{\mathrm{1}}
\newcommand{\Utwo }{\mathrm{2}}
\newcommand{\Uthree}{\mathrm{3}}
\newcommand{\Ufour }{\mathrm{4}}
\newcommand{\Ufive }{\mathrm{5}}
\newcommand{\Usix }{\mathrm{6}}
\newcommand{\Useven}{\mathrm{7}}
\newcommand{\Ueight}{\mathrm{8}}
\newcommand{\Unine }{\mathrm{9}}
%
\newcommand{\Ja}{\mathit{a}}
\newcommand{\Jb}{\mathit{b}}
\newcommand{\Jc}{\mathit{c}}
\newcommand{\Jd}{\mathit{d}}
\newcommand{\Je}{\mathit{e}}
\newcommand{\Jf}{\mathit{f}}
\newcommand{\Jg}{\mathit{g}}
\newcommand{\Jh}{\mathit{h}}
\newcommand{\Ji}{\mathit{i}}
\newcommand{\Jj}{\mathit{j}}
\newcommand{\Jk}{\mathit{k}}
\newcommand{\Jl}{\mathit{l}}
\newcommand{\Jm}{\mathit{m}}
\newcommand{\Jn}{\mathit{n}}
\newcommand{\Jo}{\mathit{o}}
\newcommand{\Jp}{\mathit{p}}
\newcommand{\Jq}{\mathit{q}}
\newcommand{\Jr}{\mathit{r}}
\newcommand{\Js}{\mathit{s}}
\newcommand{\Jt}{\mathit{t}}
\newcommand{\Ju}{\mathit{u}}
\newcommand{\Jv}{\mathit{v}}
\newcommand{\Jw}{\mathit{w}}
\newcommand{\Jx}{\mathit{x}}
\newcommand{\Jy}{\mathit{y}}
\newcommand{\Jz}{\mathit{z}}
\newcommand{\JA}{\mathit{A}}
\newcommand{\JB}{\mathit{B}}
\newcommand{\JC}{\mathit{C}}
\newcommand{\JD}{\mathit{D}}
\newcommand{\JE}{\mathit{E}}
\newcommand{\JF}{\mathit{F}}
\newcommand{\JG}{\mathit{G}}
\newcommand{\JH}{\mathit{H}}
\newcommand{\JI}{\mathit{I}}
\newcommand{\JJ}{\mathit{J}}
\newcommand{\JK}{\mathit{K}}
\newcommand{\JL}{\mathit{L}}
\newcommand{\JM}{\mathit{M}}
\newcommand{\JN}{\mathit{N}}
\newcommand{\JO}{\mathit{O}}
\newcommand{\JP}{\mathit{P}}
\newcommand{\JQ}{\mathit{Q}}
\newcommand{\JR}{\mathit{R}}
\newcommand{\JS}{\mathit{S}}
\newcommand{\JT}{\mathit{T}}
\newcommand{\JU}{\mathit{U}}
\newcommand{\JV}{\mathit{V}}
\newcommand{\JW}{\mathit{W}}
\newcommand{\JX}{\mathit{X}}
\newcommand{\JY}{\mathit{Y}}
\newcommand{\JZ}{\mathit{Z}}
%
\newcommand{\Jzero }{\mathit{0}}
\newcommand{\Jone }{\mathit{1}}
\newcommand{\Jtwo }{\mathit{2}}
\newcommand{\Jthree}{\mathit{3}}
\newcommand{\Jfour }{\mathit{4}}
\newcommand{\Jfive }{\mathit{5}}
\newcommand{\Jsix }{\mathit{6}}
\newcommand{\Jseven}{\mathit{7}}
\newcommand{\Jeight}{\mathit{8}}
\newcommand{\Jnine }{\mathit{9}}
%
\newcommand{\BA}{\boldsymbol{A}}
\newcommand{\BB}{\boldsymbol{B}}
\newcommand{\BC}{\boldsymbol{C}}
\newcommand{\BD}{\boldsymbol{D}}
\newcommand{\BE}{\boldsymbol{E}}
\newcommand{\BF}{\boldsymbol{F}}
\newcommand{\BG}{\boldsymbol{G}}
\newcommand{\BH}{\boldsymbol{H}}
\newcommand{\BI}{\boldsymbol{I}}
\newcommand{\BJ}{\boldsymbol{J}}
\newcommand{\BK}{\boldsymbol{K}}
\newcommand{\BL}{\boldsymbol{L}}
\newcommand{\BM}{\boldsymbol{M}}
\newcommand{\BN}{\boldsymbol{N}}
\newcommand{\BO}{\boldsymbol{O}}
\newcommand{\BP}{\boldsymbol{P}}
\newcommand{\BQ}{\boldsymbol{Q}}
\newcommand{\BR}{\boldsymbol{R}}
\newcommand{\BS}{\boldsymbol{S}}
\newcommand{\BT}{\boldsymbol{T}}
\newcommand{\BU}{\boldsymbol{U}}
\newcommand{\BV}{\boldsymbol{V}}
\newcommand{\BW}{\boldsymbol{W}}
\newcommand{\BX}{\boldsymbol{X}}
\newcommand{\BY}{\boldsymbol{Y}}
\newcommand{\BZ}{\boldsymbol{Z}}
\newcommand{\Ba}{\boldsymbol{a}}
\newcommand{\Bb}{\boldsymbol{b}}
\newcommand{\Bc}{\boldsymbol{c}}
\newcommand{\Bd}{\boldsymbol{d}}
\newcommand{\Be}{\boldsymbol{e}}
\newcommand{\Bf}{\boldsymbol{f}}
\newcommand{\Bg}{\boldsymbol{g}}
\newcommand{\Bh}{\boldsymbol{h}}
\newcommand{\Bi}{\boldsymbol{i}}
\newcommand{\Bj}{\boldsymbol{j}}
\newcommand{\Bk}{\boldsymbol{k}}
\newcommand{\Bl}{\boldsymbol{l}}
\newcommand{\Bm}{\boldsymbol{m}}
\newcommand{\Bn}{\boldsymbol{n}}
\newcommand{\Bo}{\boldsymbol{o}}
\newcommand{\Bp}{\boldsymbol{p}}
\newcommand{\Bq}{\boldsymbol{q}}
\newcommand{\Br}{\boldsymbol{r}}
\newcommand{\Bs}{\boldsymbol{s}}
\newcommand{\Bt}{\boldsymbol{t}}
\newcommand{\Bu}{\boldsymbol{u}}
\newcommand{\Bv}{\boldsymbol{v}}
\newcommand{\Bw}{\boldsymbol{w}}
\newcommand{\Bx}{\boldsymbol{x}}
\newcommand{\By}{\boldsymbol{y}}
\newcommand{\Bz}{\boldsymbol{z}}
%
\newcommand{\Bzero }{\boldsymbol{0}}
\newcommand{\Bone }{\boldsymbol{1}}
\newcommand{\Btwo }{\boldsymbol{2}}
\newcommand{\Bthree}{\boldsymbol{3}}
\newcommand{\Bfour }{\boldsymbol{4}}
\newcommand{\Bfive }{\boldsymbol{5}}
\newcommand{\Bsix }{\boldsymbol{6}}
\newcommand{\Bseven}{\boldsymbol{7}}
\newcommand{\Beight}{\boldsymbol{8}}
\newcommand{\Bnine }{\boldsymbol{9}}
%
\newcommand{\Balpha }{\boldsymbol{\alpha} }
\newcommand{\Bbeta }{\boldsymbol{\beta} }
\newcommand{\Bgamma }{\boldsymbol{\gamma} }
\newcommand{\Bdelta }{\boldsymbol{\delta} }
\newcommand{\Bepsilon}{\boldsymbol{\epsilon} }
\newcommand{\Bvareps }{\boldsymbol{\varepsilon} }
\newcommand{\Bvarepsilon}{\boldsymbol{\varepsilon}}
\newcommand{\Bzeta }{\boldsymbol{\zeta} }
\newcommand{\Beta }{\boldsymbol{\eta} }
\newcommand{\Btheta }{\boldsymbol{\theta} }
\newcommand{\Bvarthe }{\boldsymbol{\vartheta} }
\newcommand{\Biota }{\boldsymbol{\iota} }
\newcommand{\Bkappa }{\boldsymbol{\kappa} }
\newcommand{\Blambda }{\boldsymbol{\lambda} }
\newcommand{\Bmu }{\boldsymbol{\mu} }
\newcommand{\Bnu }{\boldsymbol{\nu} }
\newcommand{\Bxi }{\boldsymbol{\xi} }
\newcommand{\Bpi }{\boldsymbol{\pi} }
\newcommand{\Brho }{\boldsymbol{\rho} }
\newcommand{\Bvrho }{\boldsymbol{\varrho} }
\newcommand{\Bsigma }{\boldsymbol{\sigma} }
\newcommand{\Bvsigma }{\boldsymbol{\varsigma} }
\newcommand{\Btau }{\boldsymbol{\tau} }
\newcommand{\Bupsilon}{\boldsymbol{\upsilon} }
\newcommand{\Bphi }{\boldsymbol{\phi} }
\newcommand{\Bvarphi }{\boldsymbol{\varphi} }
\newcommand{\Bchi }{\boldsymbol{\chi} }
\newcommand{\Bpsi }{\boldsymbol{\psi} }
\newcommand{\Bomega }{\boldsymbol{\omega} }
\newcommand{\BGamma }{\boldsymbol{\Gamma} }
\newcommand{\BDelta }{\boldsymbol{\Delta} }
\newcommand{\BTheta }{\boldsymbol{\Theta} }
\newcommand{\BLambda }{\boldsymbol{\Lambda} }
\newcommand{\BXi }{\boldsymbol{\Xi} }
\newcommand{\BPi }{\boldsymbol{\Pi} }
\newcommand{\BSigma }{\boldsymbol{\Sigma} }
\newcommand{\BUpsilon}{\boldsymbol{\Upsilon} }
\newcommand{\BPhi }{\boldsymbol{\Phi} }
\newcommand{\BPsi }{\boldsymbol{\Psi} }
\newcommand{\BOmega }{\boldsymbol{\Omega} }
%
\newcommand{\IA}{\mathbb{A}}
\newcommand{\IB}{\mathbb{B}}
\newcommand{\IC}{\mathbb{C}}
\newcommand{\ID}{\mathbb{D}}
\newcommand{\IE}{\mathbb{E}}
\newcommand{\IF}{\mathbb{F}}
\newcommand{\IG}{\mathbb{G}}
\newcommand{\IH}{\mathbb{H}}
\newcommand{\II}{\mathbb{I}}
\renewcommand{\IJ}{\mathbb{J}}
\newcommand{\IK}{\mathbb{K}}
\newcommand{\IL}{\mathbb{L}}
\newcommand{\IM}{\mathbb{M}}
\newcommand{\IN}{\mathbb{N}}
\newcommand{\IO}{\mathbb{O}}
\newcommand{\IP}{\mathbb{P}}
\newcommand{\IQ}{\mathbb{Q}}
\newcommand{\IR}{\mathbb{R}}
\newcommand{\IS}{\mathbb{S}}
\newcommand{\IT}{\mathbb{T}}
\newcommand{\IU}{\mathbb{U}}
\newcommand{\IV}{\mathbb{V}}
\newcommand{\IW}{\mathbb{W}}
\newcommand{\IX}{\mathbb{X}}
\newcommand{\IY}{\mathbb{Y}}
\newcommand{\IZ}{\mathbb{Z}}
%
\newcommand{\FA}{\mathsf{A}}
\newcommand{\FB}{\mathsf{B}}
\newcommand{\FC}{\mathsf{C}}
\newcommand{\FD}{\mathsf{D}}
\newcommand{\FE}{\mathsf{E}}
\newcommand{\FF}{\mathsf{F}}
\newcommand{\FG}{\mathsf{G}}
\newcommand{\FH}{\mathsf{H}}
\newcommand{\FI}{\mathsf{I}}
\newcommand{\FJ}{\mathsf{J}}
\newcommand{\FK}{\mathsf{K}}
\newcommand{\FL}{\mathsf{L}}
\newcommand{\FM}{\mathsf{M}}
\newcommand{\FN}{\mathsf{N}}
\newcommand{\FO}{\mathsf{O}}
\newcommand{\FP}{\mathsf{P}}
\newcommand{\FQ}{\mathsf{Q}}
\newcommand{\FR}{\mathsf{R}}
\newcommand{\FS}{\mathsf{S}}
\newcommand{\FT}{\mathsf{T}}
\newcommand{\FU}{\mathsf{U}}
\newcommand{\FV}{\mathsf{V}}
\newcommand{\FW}{\mathsf{W}}
\newcommand{\FX}{\mathsf{X}}
\newcommand{\FY}{\mathsf{Y}}
\newcommand{\FZ}{\mathsf{Z}}
\newcommand{\Fa}{\mathsf{a}}
\newcommand{\Fb}{\mathsf{b}}
\newcommand{\Fc}{\mathsf{c}}
\newcommand{\Fd}{\mathsf{d}}
\newcommand{\Fe}{\mathsf{e}}
\newcommand{\Ff}{\mathsf{f}}
\newcommand{\Fg}{\mathsf{g}}
\newcommand{\Fh}{\mathsf{h}}
\newcommand{\Fi}{\mathsf{i}}
\newcommand{\Fj}{\mathsf{j}}
\newcommand{\Fk}{\mathsf{k}}
\newcommand{\Fl}{\mathsf{l}}
\newcommand{\Fm}{\mathsf{m}}
\newcommand{\Fn}{\mathsf{n}}
\newcommand{\Fo}{\mathsf{o}}
\newcommand{\Fp}{\mathsf{p}}
\newcommand{\Fq}{\mathsf{q}}
\newcommand{\Fr}{\mathsf{r}}
\newcommand{\Fs}{\mathsf{s}}
\newcommand{\Ft}{\mathsf{t}}
\newcommand{\Fu}{\mathsf{u}}
\newcommand{\Fv}{\mathsf{v}}
\newcommand{\Fw}{\mathsf{w}}
\newcommand{\Fx}{\mathsf{x}}
\newcommand{\Fy}{\mathsf{y}}
\newcommand{\Fz}{\mathsf{z}}
%
\newcommand{\Fzero }{\mathsf{0}}
\newcommand{\Fone }{\mathsf{1}}
\newcommand{\Ftwo }{\mathsf{2}}
\newcommand{\Fthree}{\mathsf{3}}
\newcommand{\Ffour }{\mathsf{4}}
\newcommand{\Ffive }{\mathsf{5}}
\newcommand{\Fsix }{\mathsf{6}}
\newcommand{\Fseven}{\mathsf{7}}
\newcommand{\Feight}{\mathsf{8}}
\newcommand{\Fnine }{\mathsf{9}}
%
\newcommand{\CA}{\mathcal{A}}
\newcommand{\CB}{\mathcal{B}}
\newcommand{\CC}{\mathcal{C}}
\newcommand{\CD}{\mathcal{D}}
\newcommand{\CE}{\mathcal{E}}
\newcommand{\CF}{\mathcal{F}}
\newcommand{\CG}{\mathcal{G}}
\newcommand{\CH}{\mathcal{H}}
\newcommand{\CI}{\mathcal{I}}
\newcommand{\CJ}{\mathcal{J}}
\newcommand{\CK}{\mathcal{K}}
\newcommand{\CL}{\mathcal{L}}
\newcommand{\CM}{\mathcal{M}}
\newcommand{\CN}{\mathcal{N}}
\newcommand{\CO}{\mathcal{O}}
\newcommand{\CP}{\mathcal{P}}
\newcommand{\CQ}{\mathcal{Q}}
\newcommand{\CR}{\mathcal{R}}
\newcommand{\CS}{\mathcal{S}}
\newcommand{\CT}{\mathcal{T}}
\newcommand{\CU}{\mathcal{U}}
\newcommand{\CV}{\mathcal{V}}
\newcommand{\CW}{\mathcal{W}}
\newcommand{\CX}{\mathcal{X}}
\newcommand{\CY}{\mathcal{Y}}
\newcommand{\CZ}{\mathcal{Z}}
%
\newcommand{\KA}{\mathfrak{A}}
\newcommand{\KB}{\mathfrak{B}}
\newcommand{\KC}{\mathfrak{C}}
\newcommand{\KD}{\mathfrak{D}}
\newcommand{\KE}{\mathfrak{E}}
\newcommand{\KF}{\mathfrak{F}}
\newcommand{\KG}{\mathfrak{G}}
\newcommand{\KH}{\mathfrak{H}}
\newcommand{\KI}{\mathfrak{I}}
\newcommand{\KJ}{\mathfrak{J}}
\newcommand{\KK}{\mathfrak{K}}
\newcommand{\KL}{\mathfrak{L}}
\newcommand{\KM}{\mathfrak{M}}
\newcommand{\KN}{\mathfrak{N}}
\newcommand{\KO}{\mathfrak{O}}
\newcommand{\KP}{\mathfrak{P}}
\newcommand{\KQ}{\mathfrak{Q}}
\newcommand{\KR}{\mathfrak{R}}
\newcommand{\KS}{\mathfrak{S}}
\newcommand{\KT}{\mathfrak{T}}
\newcommand{\KU}{\mathfrak{U}}
\newcommand{\KV}{\mathfrak{V}}
\newcommand{\KW}{\mathfrak{W}}
\newcommand{\KX}{\mathfrak{X}}
\newcommand{\KY}{\mathfrak{Y}}
\newcommand{\KZ}{\mathfrak{Z}}
\newcommand{\Ka}{\mathfrak{a}}
\newcommand{\Kb}{\mathfrak{b}}
\newcommand{\Kc}{\mathfrak{c}}
\newcommand{\Kd}{\mathfrak{d}}
\newcommand{\Ke}{\mathfrak{e}}
\newcommand{\Kf}{\mathfrak{f}}
\newcommand{\Kg}{\mathfrak{g}}
\newcommand{\Kh}{\mathfrak{h}}
\newcommand{\Ki}{\mathfrak{i}}
\newcommand{\Kj}{\mathfrak{j}}
\newcommand{\Kk}{\mathfrak{k}}
\newcommand{\Kl}{\mathfrak{l}}
\newcommand{\Km}{\mathfrak{m}}
\newcommand{\Kn}{\mathfrak{n}}
\newcommand{\Ko}{\mathfrak{o}}
\newcommand{\Kp}{\mathfrak{p}}
\newcommand{\Kq}{\mathfrak{q}}
\newcommand{\Kr}{\mathfrak{r}}
\newcommand{\Ks}{\mathfrak{s}}
\newcommand{\Kt}{\mathfrak{t}}
\newcommand{\Ku}{\mathfrak{u}}
\newcommand{\Kv}{\mathfrak{v}}
\newcommand{\Kw}{\mathfrak{w}}
\newcommand{\Kx}{\mathfrak{x}}
\newcommand{\Ky}{\mathfrak{y}}
\newcommand{\Kz}{\mathfrak{z}}
%
\newcommand{\Kzero }{\mathfrak{0}}
\newcommand{\Kone }{\mathfrak{1}}
\newcommand{\Ktwo }{\mathfrak{2}}
\newcommand{\Kthree}{\mathfrak{3}}
\newcommand{\Kfour }{\mathfrak{4}}
\newcommand{\Kfive }{\mathfrak{5}}
\newcommand{\Ksix }{\mathfrak{6}}
\newcommand{\Kseven}{\mathfrak{7}}
\newcommand{\Keight}{\mathfrak{8}}
\newcommand{\Knine }{\mathfrak{9}}
%
$
$
\newcommand{\Lin}{\mathop{\rm Lin}\nolimits}
\newcommand{\modop}{\mathop{\rm mod}\nolimits}
\renewcommand{\div}{\mathop{\rm div}\nolimits}
\newcommand{\Var}{\Delta}
\newcommand{\evat}{\bigg|}
\newcommand\varn[3]{D_{#2}#1\cdot #3}
\newcommand{\dtp}{\cdot}
\newcommand{\dyd}{\otimes}
\newcommand{\tra}{^T}
\newcommand{\del}{\partial}
\newcommand{\dif}{d}
\newcommand{\rbr}[1]{\left(#1\right)}
\newcommand{\sbr}[1]{\left[#1\right]}
\newcommand{\cbr}[1]{\left\{#1\right\}}
\newcommand{\cbrn}[1]{\{#1\}}
\newcommand{\abr}[1]{\left\langle #1 \right\rangle}
\newcommand{\abrn}[1]{\langle #1 \rangle}
\newcommand{\deriv}[2]{\frac{d #1}{d #2}}
\newcommand{\dderiv}[2]{\frac{d^2 #1}{d {#2}^2}}
\newcommand{\partd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\nnode}{n_n}
\newcommand{\ndim}{n_d}
\newcommand{\suml}[2]{\sum\limits_{#1}^{#2}}
\newcommand{\Aelid}[2]{A^{#1}_{#2}}
\newcommand{\dv}{\, dv}
\newcommand{\dx}{\, dx}
\newcommand{\ds}{\, ds}
\newcommand{\da}{\, da}
\newcommand{\dV}{\, dV}
\newcommand{\dA}{\, dA}
\newcommand{\eqand}{\quad\text{and}\quad}
\newcommand{\eqor}{\quad\text{or}\quad}
\newcommand{\eqwith}{\quad\text{and}\quad}
\newcommand{\inv}{^{-1}}
\newcommand{\veci}[1]{#1_1,\ldots,#1_n}
\newcommand{\var}{\delta}
\newcommand{\Var}{\Delta}
\newcommand{\eps}{\epsilon}
\newcommand{\ddt}{\frac{d}{dt}}
\newcommand{\Norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\Abs}[1]{\left|#1\right|}
\newcommand{\dabr}[1]{\left\langle\!\left\langle #1 \right\rangle\!\right\rangle}
\newcommand{\dabrn}[1]{\langle\!\langle #1 \rangle\!\rangle}
\newcommand{\idxsep}{\,}
$
$
\newcommand{\veciup}[1]{#1^1,\ldots,#1^n}
\newcommand{\setveci}[1]{\cbrn{\veci{#1}}}
\newcommand{\setveciup}[1]{\cbrn{\veciup{#1}}}
\newcommand{\tang}{T}
$
When I was learning about Continuum Mechanics for the first time, the covariance
and contravariance of vectors confused the hell out of me. The concepts gain
meaning in the context of Riemannian Geometry, but it was surprising to find
that one doesn’t need to learn an entire subject to grasp the logic behind
co-/contravariance. An intermediate knowledge of linear algebra is enough—that
is, one has to be acquainted with the concept of vector spaces and one-forms.
The duality of co-/contravariance arises when one has to define vectors in terms
of a non-orthonormal basis. The reason such terminology doesn’t show up
in engineering education is that Cartesian coordinates are enough for most
engineering problems. But every now and then, a complex problem with funky
geometrical requirements show up, like one that requires measuring distances and
areas on non-flat surfaces. Then you end up with dual vector spaces. I’ll try to
give the basics of duality below.
Definition: Let $\CV$ be a finite-dimensional real vector space.
The space $\CV^\ast = \CL(\CV,\IR)$,
defined as the
the space of all one-forms $\Balpha:\CV\to\IR$, is called the
dual space to $\CV$.
Let $B=\cbr{\Be_1,\dots,\Be_n}$ be a basis of $\CV$. Any vector $\Bv\in\CV$ can be written
in terms of $B$ as
\[\begin{equation}
\Bv = a_1 \Be_1 + \cdots + a_n\Be_n
\label{eq:vectorrep1}
\end{equation}\]
with the components $a_1,\dots,a_n\in\IR$.
For any $i=1,\dots,n$, we can define the $i$-th component $a_i$ by a one-form as
\[\begin{equation}
\Be^i :=
\left\{
\begin{aligned}
\CV &\to \IR \\
\Bv &\mapsto \Be^i(\Bv) = a_i
\end{aligned}\right.
\end{equation}\]
These elements are linear and thus are in the space
$\CL(\CV,\IR)$ .
Given any basis $B=\setveci{\Be}$, we call $B^\ast = \setveciup{\Be}$
the basis of $\CV^\ast$ dual to $B$.
The fact that $B^\ast$ really is a basis of $\CV^\ast$ can be proved
by showing that $\Be^i$ are linearly independent.
Then $\Bv$ has the following
representation
\[\begin{equation}
\Bv = \Be^1(\Bv)\, \Be_1 + \cdots + \Be^n(\Bv)\, \Be_n.
\label{eq:vectorrep2}
\end{equation}\]
Instead of $a_i$, it is practical to denote the components of $\Bv$ as $v^i$,
lightface of the same symbol with a raised index corresponding to
the raised index of the dual basis:
\[\begin{equation}
\Bv = v^1 \Be_1 + \cdots + v^n \Be_n
\eqwith
v^i = \Be^i(\Bv).
\end{equation}\]
In fact, this convention is more compatible with
the symmetry caused by the duality.
This point will be more clear after the introduction of
dual basis representation of one-forms.
Proposition: Each $\Be^i \in \CL(\CV,\IR)$ can be identified by its action on the basis
$B$:
\[\begin{equation}
\Be^i(\Be_j) =
\begin{cases}
1 & \text{if } i=j \\
0 & \text{otherwise}.
\end{cases}
\label{eq:dualbasis2}
\end{equation}\]
Proof: For any $\Bv\in\CV$, $\Be^i(\Bv)$ must give $v^i$, the
$i$-th component of $\Bv$.
Setting $\Bv = \Be_j$, one sees that
$\Be^i(\Bv)=v^i = 1$ when $i=j$, and is zero otherwise.
Geometrically, \eqref{eq:dualbasis2} implies that a basis vector is
perpendicular to all the dual basis vectors, except its own dual.
Let $\Balpha$ be a one form in $\CV^\ast$ with the corresponding
dual basis $\setveciup{\Be}$. Then similar to a vector,
$\Balpha$ has the following representation
\[\begin{equation}
\begin{aligned}
\Balpha(\cdot)
&= \Balpha(\Be_1)\,\Be^1(\cdot)
+ \dots
+ \Balpha(\Be_n)\,\Be^n(\cdot) \\
&= \alpha_1 \Be^1(\cdot)
+ \dots
+ \alpha_n \Be^n(\cdot)
\end{aligned}
\end{equation}\]
where the components of the one-form $\Balpha$
are defined as
\[\begin{equation}
\alpha_i = \Balpha(\Be_i).
\end{equation}\]
Proof: We substitute \eqref{eq:vectorrep2} and obtain
\[\begin{equation}
\begin{aligned}
\Balpha(\Bv) &= \Balpha\rbr{\suml{i=1}{n} \Be^i(\Bv)\, \Be_i}
= \suml{i=1}{n} \Balpha(\Be_i)\, \Be^i(\Bv) \\
\end{aligned}
\end{equation}\]
using $\Balpha$’s linearity.
Notation:
Let $\CV$ be a finite-dimensional real vector space.
For $\Bv\in\CV$ and $\Balpha\in\CV^\ast$
\[\begin{equation}
\abrn{\cdot,\cdot} :=
\left\{\begin{aligned}
\CV\times\CV^\ast &\to \IR \\
(\Bv, \Balpha) &\mapsto \Balpha(\Bv)
\end{aligned}\right.
\end{equation}\]
denotes the action of $\Balpha$ on $\Bv$, and is called
a natural pairing or dual pairing
between a vector space and its dual.
It is of the essence to understand that $\abrn{\cdot,\cdot}$ does not
denote an inner product in $\CV$ ; that is,
$\abr{\Bv,\Balpha}$ means $\Balpha(\Bv)$.
With this notation, \eqref{eq:vectorrep2} can be written as
\[\begin{equation}
\Bv = \abrn{\Bv,\Be^1}\, \Be_1
+ \cdots
+ \abrn{\Bv,\Be^n}\, \Be_n.
\end{equation}\]
and \eqref{eq:dualbasis2} as
\[\begin{equation}
\abrn{\Be_i, \Be^j} = \delta_{ij}.
\label{eq:dualbasis1}
\end{equation}\]
Using the convention that $\Be_i$ are column vectors and
$\Be^i$ are row vectors,
\eqref{eq:dualbasis1} can be rearranged in the following manner
\[\begin{equation}
\left[
\begin{array}{@{} c|c|c|c @{}}
\Be_1&\Be_2&\cdots&\Be_n
\end{array}
\right]\inv
=
\left[
\begin{array}{@{} c @{}}
\Be^1 \\ \hline \Be^2 \\ \hline \vdots \\ \hline \Be^n
\end{array}
\right]
\label{eq:computedualbasis1}
\end{equation}\]
which can be used to compute a dual basis.
Example: Given a two-dimensional vector space $\CV$ with a basis
$\Be_1=[2,-0.5]\tra$, $\Be_2=[1,1]\tra$, we use
\eqref{eq:computedualbasis1} to compute
\[\begin{equation}
\begin{bmatrix}
2 & 1 \\
-0.5 & 1
\end{bmatrix}\inv
=
\begin{bmatrix}
0.4 & -0.4 \\
0.2 & 0.8
\end{bmatrix}
\end{equation}\]
and obtain the dual basis vectors as
$\Be^1=[0.4,-0.4]$ and $\Be^2=[0.2,0.8]$.
The result is given in the
following figure,
where one can see that $\Be_1\perp\Be^2$, $\Be^1\perp\Be_2$.
A body $\CB$ embedded in $\IR^2$ with curvilinear coordinates.
Every point $\CP$ at $\BX$ has an associated two-dimensional vector space,
called $\CB$’s tangent space at $\BX$, denoted $\tang_\BX\CB$. The basis
$\Be_i$ corresponding to coordinates $\theta_i$ are not necessarily
orthogonal and can admit corresponding duals $\Be^i$, due to
curvilinearity.
The coordinates appear to be affine at the point’s immediate vicinity,
and thus in the tangent space.
The introduction of the dual space
allows us to reinterpret a one-form $\Balpha$
as an object residing in the dual space. In fact,
the canonical duality $\CV^{\ast\ast}=\CV$
states that every vector $\Bv$ can be interpreted as a functional
on the space $\CV^\ast$ via
\[\begin{equation}
\Bv:=
\left\{
\begin{aligned}
\CV^\ast &\to \IR \\
\Balpha &\mapsto \Bv(\Balpha) \text{ or } \abrn{\Bv, \Balpha}
\end{aligned}\right.
\end{equation}\]