Covector transformation under a change of basis (source code)

= Covector transformation under a change of basis
{title2=$x'=B^{-1}x,\quad\ell'=\ell B$}

Let the columns of an <invertible matrix> $B$ be a new <basis> expressed in the old <basis>. The same <vector> has old <coordinate vector> $x$ and new <coordinate vector> $x'=B^{-1}x$. If a <covector> has old row $\ell$, its new row is $\ell'=\ell B$, since
$$
\ell'x'=\ell B B^{-1}x=\ell x.
$$
Thus the scalar <dual pairing> stays unchanged. If <covector> coefficients are stored as a column $c=\ell^T$, their new column is $c'=B^Tc$; this is the inverse transpose of the transformation $x\mapsto B^{-1}x$ on <vector> coordinates. These conventions express the <covariance and contravariance of vectors>. https://www.math.brown.edu/streil/papers/LADW/HTML_2026_04-30/Ch8.html[Sergei Treil, Linear Algebra Done Wrong, §8.1.1: coordinate changes in the dual space]{ref}.

For the <basis> $b_1=(1,0)$, $b_2=(1,1)$,
$$
B=\begin{pmatrix}1&1\\0&1\end{pmatrix},\qquad
x=\begin{pmatrix}3\\1\end{pmatrix},\qquad
x'=\begin{pmatrix}2\\1\end{pmatrix}.
$$
The <linear functional> $\varphi(x,y)=2x-y$ has rows $\ell=\begin{pmatrix}2&-1\end{pmatrix}$ and $\ell'=\begin{pmatrix}2&1\end{pmatrix}$. Both calculations give five: $2\cdot3-1\cdot1=2\cdot2+1\cdot1$. Changing the <basis> changes the descriptions, not the measured value.