Q. Consider the following direct sum decomposition of subspaces of $\mathbb{C}^4 = V_1 \oplus V_2\oplus V_3$. The subspaces are defined by the canonical basis of $\mathbb{C}^4$ by the expressions $V_1 =\text{span} \{ \vec{e_2}, \vec{e_4} \}$, $V_2 = \text{span} \{\vec{e_1} + \vec{e_3}\}$, and $V_3 =\text{span} \{\vec{e_1} − \vec{e_3}\}$. If $\vec{x}= \vec{x_1} + \vec{x_2}+ \vec{x_3}$ is the decomposition of a vector $\vec{x} \in \mathbb{C}^4$ With respect to the previous sum, the linear operator is defined $f(\vec{x}) = −\vec{x_1} + i\vec{x_2} − i\vec{x_3}$. Find the linear operator $f$ in the canonical base.
This problem is quite different from what I'm used to be getting it confuses me and I'm having troubles with finding where to even start, I know that the direct sum means $V_1,V_2$ and $V_3$ have to be linearly independent. Which then I can only guess that we can substitute: $$f(\vec{x})=f(\vec{x_1}+\vec{x_2}+\vec{x_3})=-\vec{x_1}+i\vec{x_2}-i\vec{x_3}$$ and maybe go from there? But I'm pretty lost and it's supposedly the beginning of the problem that goes on.
There are two ways of doing this:
Finally the corresponding matrix has to achieve precisely this transformation, that is, $e_1\mapsto f(e_1)=ie_3$, $e_2\mapsto f(e_2)=-e_2$, and so on. This is what gives you the columns of this matrix, resulting in
The last thing we need is the inverse of $P$. We can either compute $P^{-1}$ by inverting $P$ or --- because $P^{-1} $ describes how the old basis translates into the new one --- we can repeat the above process, but now the two bases are switched. For the latter, e.g., $\text{old basis vector}_4=e_1-e_3=\text{new basis vector}_1-\text{new basis vector}_3$ so the fourth column of $P^{-1}$ is given by $(1,0,-1,0)^\top$. Either way one finds $P^{-1}=$
With this all that is left is to multiply these matrices in the correct order: computing $P^{-1}MP$ indeed yields the same matrix we found via the previous method.
As a final remark let me emphasize that in this example the first method is easier because $f$ in the old basis was already of a rather convenient form. For generic linear transformations the second method is better suited because expanding the image of $f$ in different bases can become quite cumbersome, and this method outsources this expansion step to a simple matrix multiplication.