I am struggling with the covariance and contravariance of vectors. In my physics classes, the professor explained that if covariant components transform with a certain matrix, then contravariant components transform with its inverse. However, I find the latter to be the transpose of the inverse.
Here is my line reasoning:
Let $ V $ be an $ n $-dimensional real vector space and let $ \langle , \rangle $ be a positive definite scalar product on $ V $. Let $ \mathcal{B} = \{e_i, \dots , e_n\} $ and $ \mathcal{B}' = \{e_i', \dots , e_n'\} $ be bases of $ V $ and $ v \in V $. We denote by $ X $ the components of $ v $ with respect to $ \mathcal{B} $ and with $ X' $ its components with respect to $ \mathcal{B}' $. We have that $ X = NX' $, where $ N = ((e_1')_{\mathcal{B}}, \dots, (e_n')_{\mathcal{B}}) $, i.e. $ N $'s columns are the coordinate vectors of the $ e_i' $s with respect to $ \mathcal{B} $.
We define $ \varphi : V \to V, \; \varphi (e_i) = e_i' $. Then, if we fix the base $ \mathcal{B} $ on both the domain and the codomain, $ \varphi $ is represented by the matrix $ N $. We define $ X $ to be the contravariant components of $ v $ (with respect to $ \mathcal{B} $). Let $ C $ be the $ n \times n $ matrix that represents $ \langle, \rangle $ with respect to $ \mathcal{B} $.
We have that the covariant components of $ v $ in the base $ \mathcal{B} $ are \begin{equation}\label{} v_i = \langle v, e_i \rangle = \langle e_i, v \rangle = ((e_i)_{\mathcal{B}} )^TCX \end{equation} while those in the base $ \mathcal{B}' $ are \begin{equation}\label{} v_i' = \langle v, e_i' \rangle = \langle e_i', v \rangle = ((e_i')_{\mathcal{B}})^TCX = (N(e_i)_{\mathcal{B}} )^TCX = ((e_i)_{\mathcal{B}} )^TN^TCX \end{equation}
Then we have \begin{equation}\label{} \begin{pmatrix} v_1' \\ \vdots \\ v_n' \\ \end{pmatrix} = N^TCX = N^T \begin{pmatrix} v_1 \\ \vdots \\ v_n \end{pmatrix} \end{equation} This shows that to get from $ X $ to $ X' $ I use the matrix $ N^{-1} $, while for the covariant components I use the matrix $ N^T $.
What am I doing wrong?