Question about projection onto subspaces Suppose I have an $n\times n$ (complex) matrix $Q$ viewed as a linear transformation from $\mathbb{C}^{n}$ to $\mathbb{C}^{n}$. I'm struggling to understand the difference between the following two scenarios. For simplicity, let us consider $n = 4$.
Scenario 1: Let $S$ be a subspace of $\mathbb{C}^{4}$ of dimension $d=2$. Let us think of $S$ as the subspace generated by two eigenvectors $v_{1}$ and $v_{2}$ of $Q$.One can construct a projection matrix $P_{S}$. According to this post, this projection should be given by:
$$P_{S} = A(A^{T}A)^{-1}A^{T}$$
where $A = [v_{1} \hspace{0.1cm} v_{2}]$ the a $4\times 2$ matrix. This is a $4\times 4$ matrix.
Scenario 2: Let us write $\mathbb{C}^{4} = S \oplus S^{\perp}$. Since $Q$ is a linear operator on $\mathbb{C}^{4}$, it might be possible to decompose $Q = Q_{1}\oplus Q_{2}$ so that, if $u = u_{1}+u_{2}$ and $u_{1}\in S$ and $u_{2} \in S^{\perp}$:
$$Qu = Q_{1}u_{1}\oplus Q_{2}u_{2}$$
Each $Q_{i}$ should be a $2\times 2$ matrix.
Here is my problem. I would expect that $Q_{1} = QP_{S}$, since $Q_{1}$ should be the restriction of $Q$ to $S$. However, as I stressed before, both $Q$ and $P_{S}$ are $4\times 4$ matrices. So, where is the gap? If $Q_{1}$ is not $QP_{S}$, how can I obtain $Q_{1}$? And finally, why is $P_{S}$ a $4\times 4$ matrix if it projects into a subspace of dimension $2$? (I would expect it to be a $2\times 4$ matrix instead).

There is something fiddly happening here which basically boils down to the fact that you can view $Q_1$ (and $Q_2$) as matrices in $GL(2;\mathbb{C})$ since they act on a $2$ dimensional space, or view them as elements of $GL(2;\mathbb{C}) \subset GL(4;\mathbb{C})$ i.e. view them as $4 \times 4$ matrices.
As $S$ is viewed as a subset of $\mathbb{C}^4$ it is a good idea to view $u_1$ and $u_2$ as vectors with four entries even though $u_1 \in S$ and $u_2 \in S^{\perp}$, which are both $2$ dimensional subspaces of our original space.
As in example, if our space is $\mathbb{C}^4$ and we consider $S = \{e_1,e_2\}$ where $e_1$ and $e_2$ are the standard basis vectors then we would still want to write, $e_1 = \begin{pmatrix} 1 \\0\\0\\0 \end{pmatrix}$ rather than $\begin{pmatrix} 1 \\ 0 \end{pmatrix}$ even though $e_1 \in S$, where $S$ is a $2$-dimensional space, due to the fact that we view $S$ as a subspace of $\mathbb{C}^4$.
Thus, we need $Q_1$ and $Q_2$ to be $4 \times 4$ matrices, it might look something like this:
$Q = \begin{pmatrix} 1&0&0&0\\0&4&0&0\\0&0&5&6\\0&0&7&8 \end{pmatrix} = \begin{pmatrix} 1&0&0&0\\0&4&0&0\\0&0&0&0\\0&0&0&0 \end{pmatrix} + \begin{pmatrix} 0&0&0&0\\0&0&0&0 \\0&0&5&6\\0&0&7&8 \end{pmatrix} = Q_1 + Q_2$.
So yes, if you view $Q_1$ as a $4 \times 4$ matrix then you will have $Q_1 = QP_S$ (and someone please correct me if I'm wrong, but I don't see why $Q_1 = P_SQ$ also wouldn't work).
