I'm currently studying a bit of Linear Algebra, and was just hoping for some feedback and clarification on some material I'm covering with respect to forming change-of-basis matrices.
So for some preliminaries, fix the underlying vector space to be $\mathbb{R}^n$, and consider two sets of ordered bases $\mathcal{U} = \{u_1, u_2, \cdots, u_n\}$ and $\mathcal{V} = \{v_1, v_2, \cdots, v_n\}$. (And let $\mathcal{E} = \{e_1, e_2, \cdots, e_n\}$ be the standard basis.)
One can then define the transition matrix $$P_v: (\mathbb{R}^n, \mathcal{V}) \rightarrow (\mathbb{R}^n, \mathcal{E})\\ [\mathbf{x}]_\mathcal{V} \mapsto [\mathbf{x}]_\mathcal{E} $$ that takes $[\mathbf{x}]_\mathcal{V}$, the coordinates of a vector $x$ with respect to the basis $\mathcal{V}$, and returns $[\mathbf{x}]_\mathcal{E}$, its coordinates with respect to the standard basis $\mathcal{E}$. This matrix can be constructed as $P_v = [v_1~v_2~ \cdots ~v_n]$, where the $i$th column is $v_i$.
One can show that if $\mathcal{V}$ is indeed a basis, then $P_v$ is never singular, and so the matrix $$P_v^{-1}: (\mathbb{R}^n, \mathcal{E}) \rightarrow (\mathbb{R}^n, \mathcal{V})\\ [\mathbf{x}]_\mathcal{E} \mapsto [\mathbf{x}]_\mathcal{V}$$ can be formed which takes a vector $[\mathbf{y}]_\mathcal{E}$ with coordinates in the standard basis $\mathcal{E}$ and returns $[\mathbf{y}]_\mathcal{V}$, its coordinates with respect to the basis $\mathcal{V}$.
A similar construction can be carried out for $\mathcal{U}$, yielding $$P_u: (\mathbb{R}^n, \mathcal{U}) \rightarrow (\mathbb{R}^n, \mathcal{E})\\ [\mathbf{x}]_\mathcal{U} \mapsto [\mathbf{x}]_\mathcal{E}$$ and $$P_u^{-1}: (\mathbb{R}^n, \mathcal{E}) \rightarrow (\mathbb{R}^n, \mathcal{U}) \\ [\mathbf{x}]_\mathcal{E} \mapsto [\mathbf{x}]_\mathcal{U}$$.
Finally, we can consider the transition matrix $$P_{uv}: (\mathbb{R}^n, \mathcal{U}) \rightarrow (\mathbb{R}^n, \mathcal{V})\\ [\mathbf{x}]_\mathcal{U} \mapsto [\mathbf{x}]_\mathcal{V}$$ which changes basis from $\mathcal{U}$ to $\mathcal{V}$ directly. From the types of these maps alone, we can deduce that this map factors as $P_{uv} = P_v^{-1} P_u$, which first maps $\mathcal{U}$ into $\mathcal{E}$, then maps $\mathcal{E}$ into $\mathcal{V}$.
So say for example we have a question like the following, paraphrased from Leon's Linear Algebra with Applications:
Given a basis $\mathcal{U} = \{u_1, u_2\}$ and a matrix $S$, find a basis $\mathcal{V} = \{v_1, v_2\}$ such that $S$ is the transition matrix from $\mathcal{V}$ to $\mathcal{U}$.
My general approach here has been to just consider the equation $$S = P_{uv} = P_v^{-1}P_u.$$
It seems that anytime you know a basis $\mathcal{U}$, you can always form $P_u$ and $P_u^{-1}$. In this case, since $S$ and $\mathcal{U}$ are given, $P_u$ is known. So rearranging the above equation yields $P_v = P_u S^{-1}$, and the columns of $P_v$ can be taken as the desired basis $\mathcal{V}$.
Similarly, if one is instead given $\mathcal{V}$ and wants to find $\mathcal{U}$, the solution can then be taken as the columns of the solution to $P_u = P_v S$.
My question here is simply whether or not this is a correct approach - the solutions I obtain using this method don't seem agree with a few other sources, so a sanity check would be extremely helpful!
You have the order of multiplication the wrong way around. $S = P_uP_v^{-1}$. Think about the order you're doing the operations on. You take a vector in $\mathcal{V}$, say $v$, multiply it by $P_v^{-1}$ to get to the standard basis, and then multiply by $P_u$ to convert to its representation in $\mathcal{U}$. So what you've done to $v$ overall is $P_u P_v^{-1}v$, so $S = P_u P_v^{-1}v$.
You can see this visually by $[x]_\mathcal{V} \mapsto [x]_\mathcal{E} \mapsto [x]_\mathcal{U}$ and noting that composition of maps has the first map applied on the absolute right of the product.