Say you have two coordinate systems, \(\hat a_i\) and \(\hat c_i\), and a vector \(\bar r\). And you have \(\bar r\) written in component form in the \(\hat c_i\) coordinate system1:
\[ \bar r = ₵_1 \hat c_1 + ₵_2 \hat c_2 + ₵_3 \hat c_3 \]
Where the \(₵_i\) are the components.
You want \(\bar r\) written in component form in the \(\hat a_i\) coordinate system, how do you get it? This is called a coordinate transformation, and isn’t too hard to figure out if you start with a diagram like the one above with the two coordinate systems ontop of each other. If you ignore the \(\hat c_i\) coordinate system and just ask “how do you write \(\bar r\) in \(\hat a_i\)” the answer is just: project \(\bar r\) onto each of the \(\hat a_i\) to get the 3 components of \(\bar r\) in \(\hat a_i\) and be done with it. We have our definition of \(\bar r\) in \(\hat c_i\), though, so we can just project that onto \(\hat a_i\):
\[ \bar r = ((₵_1 \hat c_1 + ₵_2 \hat c_2 + ₵_3 \hat c_3) \cdot \hat a_1) \hat a_1 + ((₵_1 \hat c_1 + ₵_2 \hat c_2 + ₵_3 \hat c_3) \cdot \hat a_2) \hat a_2 + ((₵_1 \hat c_1 + ₵_2 \hat c_2 + ₵_3 \hat c_3) \cdot \hat a_3) \hat a_3 \]
If we use column vector component notation 2 the original \(\bar r\) in \(\hat c_i\) is written:
\[ \bar r = \begin{bmatrix} ₵_1 \\ ₵_2 \\ ₵_3 \end{bmatrix}_{\hat c_i} \]
Then the transformation can be represented by the matrix:
\[
\bar r = \begin{bmatrix} \hat c_1 \cdot \hat a_1 & \hat c_2 \cdot \hat a_1 & \hat c_3 \cdot \hat a_1 \
\hat c_1 \cdot \hat a_2 & \hat c_2 \cdot \hat a_2 & \hat c_3 \cdot \hat a_2 \
\hat c_1 \cdot \hat a_3 & \hat c_2 \cdot \hat a_3 & \hat c_3 \cdot \hat a_3 \end{bmatrix}
\begin{bmatrix} ₵_1 \\ ₵_2 \\ ₵_3 \end{bmatrix}_{\hat c_i}
\]
Note that since the two coordinate systems \(\hat c_i\) and \(\hat a_i\) are orthonormal the matrix above is orthonormal. Elsewhere on this site I would write the above as:
\[ \bar r = \mathbf R_{ac} \begin{bmatrix} ₵_1 \\ ₵_2 \\ ₵_3 \end{bmatrix}_{\hat c_i} \]
because the coordinate transformation matrix is the same as a vector rotation, just looked at from a different perspective. A coordinate transformation takes a vector, keeps it the same, and represents (the same vector, completely unchanged!) in a new coordinate system. A rotation takes a vector in a coordinate system and rotates it to a different vector in the same coordinate system. The problem in the case of rotations is that since there’s no second known coordinate system, you typically need to derive the orthnormal rotation matrix via some other route.