# Change of basis matrix for an operator

Suppose I have two operators, $D \equiv \frac{d}{dt}$ and $D^2 \equiv \frac{d^2}{dt^2}$, represented in matrix form by two different bases $\mathbf{e} = \left \{\cos (wt), \sin (wt) \right \}$ and $\mathbf{e'} = \left \{e^{iwt}, e^{-iwt} \right \}$.

For $\mathbf{e}$:

$$D_{\mathbf{e}} = \begin{pmatrix} 0 &w \\ -w & 0 \end{pmatrix}, \ \ D_{\mathbf{e}}^2 = \begin{pmatrix} -w^2 &0 \\ 0 & -w^2 \end{pmatrix}$$

For $\mathbf{e'}$:

$$D_{\mathbf{e'}} = \begin{pmatrix} iw &0 \\ 0 & -iw \end{pmatrix}, \ \ D_{\mathbf{e'}}^2 = \begin{pmatrix} -w^2 &0 \\ 0 & -w^2 \end{pmatrix}$$

How do I proceed if I wanted to find the transformation matrix between the bases $\mathbf{e}$ and $\mathbf{e'}$?

In my old linear algebra textbook there's a tutorial of how to do it for vectors (column matrices) but I got confused when trying to do it with operators (square matrices).

The basis vectors are not column matrices (as you noted in your question) but they are not square matrices either. They are the functions in the two bases, that is, $\cos wt$ etc. The transformation matrix from $\def\b#1{{\bf#1}}\b e'$ to $\b e$ has columns which are the functions in $\b e'$, expressed as coordinate vectors with respect to $\b e$. Since the first vector (i.e., function) in $\b e'$ can be written $$e^{iwt}=\cos wt+i\sin wt\ ,$$ the matrix is $$\pmatrix{1&?\cr i&?\cr}$$ and I'm sure you can do the rest for yourself.