# Introduction Consider a finite [[Dimension|dimensional]] [[vector space]] $V$ of dimension $n$, with three [[basis|bases]], $\mathcal{A} = \{\pmb{a}_1, \ldots, \pmb{a}_n\}$, $\mathcal{B} = \{\pmb{b}_1, \ldots, \pmb{b}_n\}$, and $\mathcal{E} = \{\pmb{e}_1, \ldots, \pmb{e}_n\}$, where $\mathcal{E}$ is the [[standard basis]]. Consider an arbitrary [[vector]] $\pmb{x} \in V$. In the $\mathcal{A}$ basis, we write it as the [[column vector]] $[\pmb{x}]_\mathcal{A}$ and similarly for $\mathcal{B}$ and $\mathcal{E}$. We can relate these different column vectors via the *change of basis matrix*. $ \begin{align} [\pmb{x}]_\mathcal{B} &= P_{\mathcal{A} \rightarrow \mathcal{B}} [\pmb{x}]_\mathcal{A}\\ [\pmb{x}]_\mathcal{A} &= P_{\mathcal{E} \rightarrow \mathcal{A}} [\pmb{x}]_\mathcal{E}\\ [\pmb{x}]_\mathcal{B} &= P_{\mathcal{E} \rightarrow \mathcal{B}} [\pmb{x}]_\mathcal{E}\\ \end{align} $ where the *change of basis matrix* from $\mathcal{A}$ to $\mathcal{B}$, denoted $P_{\mathcal{A} \rightarrow \mathcal{B}}$ is given by: $ P_{\mathcal{A} \rightarrow \mathcal{B}} = ([\pmb{a}_1]_{\mathcal{B}}, \ldots, [\pmb{a}_1]_{\mathcal{B}}), $ i.e., the matrix whose columns are the basis vector in $\mathcal{A}$ but expressed in the $\mathcal{B}$ basis. This is generally simple enough to compute by hand in 3 dimensions, and we're technically done. However, what if we already know the coordinates in the standard basis of all the $\pmb{a}_i$ and $\pmb{b}_i$ (i.e., we know $[\pmb{a}_i]_\mathcal{E}$ and $[\pmb{b}_i]_\mathcal{E}$) and would like to directly compute the *transition matrix*? Note that $ [\pmb{a}_i]_\mathcal{B} = P_{\mathcal{E} \rightarrow \mathcal{B}} [\pmb{a}_i]_\mathcal{E} $ therefore $ \begin{align} P_{\mathcal{A} \rightarrow \mathcal{B}} &= P_{\mathcal{E} \rightarrow \mathcal{B}}([\pmb{a}_1]_{\mathcal{E}}, \ldots, [\pmb{a}_n]_{\mathcal{E}}),\\ &= P_{\mathcal{E} \rightarrow \mathcal{B}}^{-1}([\pmb{a}_1]_{\mathcal{E}}, \ldots, [\pmb{a}_n]_{\mathcal{E}}),\\ &= ([\pmb{b}_1]_{\mathcal{E}}, \ldots, [\pmb{b}_n]_{\mathcal{E}})^{-1}([\pmb{a}_1]_{\mathcal{E}}, \ldots, [\pmb{a}_n]_{\mathcal{E}}), \end{align} $ where we have used that fact that: $ P_{\mathcal{A} \rightarrow \mathcal{B}} ^{-1} = P_{\mathcal{B} \rightarrow \mathcal{A}} $ # Example: Crystals Let's assume that the $\mathcal{A} \equiv \mathcal{Conv}$ basis is conventional unit cell and $\mathcal{B} \equiv \mathcal{Prim}$ is the primitive unit cell. Let's assume we have converted their basis vectors into cartesian coordinates, i.e., the basis $\mathcal{E}$, so that we have $\{[\pmb{p}_1]_\mathcal{E}, [\pmb{p}_2]_\mathcal{E}, [\pmb{p}_3]_{\mathcal{E}}\}$ (the primitive basis vectors in cartesian coordinates) and $\{[\pmb{c}_1]_\mathcal{E}, [\pmb{c}_2]_\mathcal{E}, [\pmb{c}_3]_{\mathcal{E}}\}$ (the conventional basis vectors in cartesian coordinates). Then we form two matrices: $ C = ([\pmb{c}_1]_{\mathcal{E}}, [\pmb{c}_2]_{\mathcal{E}}, , [\pmb{c}_3]_{\mathcal{E}}) \qquad P = ([\pmb{p}_1]_{\mathcal{E}}, [\pmb{p}_2]_{\mathcal{E}}, , [\pmb{p}_3]_{\mathcal{E}}) $ and the "transformation matrix" (technically, the transition matrix) is simply: $ T_{\mathcal{Conv}\rightarrow\mathcal{Prim}} = P^{-1} C \qquad T_{\mathcal{Prim}\rightarrow\mathcal{Conv}} = C^{-1} P $