Finding a invariant subspaces for a specific matrix Good morning,
How does one find the subspaces that are invariant under $A$ for
$$A = \begin{pmatrix} 1 & 0 & 0 & 0\\  0 &2  & 0 & 0\\  0 & 0 & 2 & 0\\  0 & 0 & 0 & 3 \end{pmatrix}\  \in M_{4} (\mathbb{R}).$$
Thank you.
 A: Define $\mathscr{T}:\mathbb{R}^{4}\rightarrow\mathbb{R}^{4}$ by $\mathscr{T}(\mathbf{x})=A\mathbf{x}$ for $\mathbf{x}\in \mathbb{R}^{4},$ where $$A=\begin{pmatrix}
 1&  0&  0&  0\\ 
 0&  2&  0&  0\\ 
 0&   0&  2&  0\\ 
 0&  0&   0&  3  
\end{pmatrix}\in M_{4} (\mathbb{R}).$$
$$\mathbf{e}_{1}=(1,0,0,0)^{T},\mathbf{e}_{2}=(0,1,0,0)^{T},\mathbf{e}_{3}=(0,0,1,0)^{T},\mathbf{e}_{4}=(0,0,0,1)^{T}.$$
The complete list of $\mathscr{T}$-invariant subspaces :


*

*Zero-dimensional subspace: $\{\mathbf{0}\}.$

*One-dimensional subspaces:$$\text{Span}\lbrace \mathbf{e}_{1}\rbrace,\text{Span}\lbrace \mathbf{e}_{2}\rbrace,\text{Span}\lbrace \mathbf{e}_{3}\rbrace,
\text{Span}\lbrace \mathbf{e}_{4}\rbrace,\text{Span}\lbrace \mathbf{e}_{2}+k\mathbf{e}_{3}\rbrace(k\ne 0).$$

*Two-dimensional subspaces:
$$\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{2}\rbrace,\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{3}\rbrace,\text{Span}\lbrace\mathbf{e}_{1},\mathbf{e}_{4}\rbrace,
\text{Span}\lbrace\mathbf{e}_{2},\mathbf{e}_{3}\rbrace,\text{Span}\lbrace \mathbf{e}_{2},\mathbf{e}_{4}\rbrace,\text{Span}\lbrace\mathbf{e}_{3},\mathbf{e}_{4}\rbrace,\text{Span}\lbrace\mathbf{e}_{1},\mathbf{e}_{2}+k\mathbf{e}_{3}\rbrace(k\ne 0),\text{Span}\lbrace\mathbf{e}_{4},\mathbf{e}_{2}+k\mathbf{e}_{3}\rbrace(k\ne 0).
$$

*Three-dimensional subspaces:
$$\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{2},\mathbf{e}_{3}\rbrace,\text{Span}\lbrace \mathbf{e}_{2},\mathbf{e}_{3},\mathbf{e}_{4}\rbrace,\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{2},\mathbf{e}_{4}\rbrace,\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{3},\mathbf{e}_{4}\rbrace,\text{Span}\lbrace \mathbf{e}_{1},\mathbf{e}_{4},\mathbf{e}_{2}+k\mathbf{e}_{3}\rbrace(k\ne0).$$


*

*Four-dimensional subspace:$\text{Span}\lbrace\mathbf{e}_{1},\mathbf{e}_{2},\mathbf{e}_{3},\mathbf{e}_{4}\rbrace.$

A: A subspace $\mathbf{W}$ is invariant under $A$ if and only for every $\mathbf{w}\in\mathbf{W}$, $A\mathbf{w}\in\mathbf{W}$. 
The only $0$-dimensional subspace is always invariant (for any matrix), since $A\mathbf{0}=\mathbf{0}\in\{\mathbf{0}\}$.
$\mathbf{V}$ itself (in this case, $\mathbb{R}^4$) is also always invariant, since $A\mathbf{v}\in\mathbb{R}^4$ for every $\mathbf{v}\in\mathbb{R}^4$.
So, let's deal with the in-betweens:


*

*A $1$-dimensional invariant subspace; well, a $1$-dimensional subspace is of the form $\mathbf{W} = \{\alpha\mathbf{w}_0\mid\alpha\in\mathbb{R}\}$ for some fixed nonzero vector $\mathbf{w}_0$. If such a $\mathbf{W}$ is invariant, then $A(\alpha\mathbf{w}_0)=\alpha A\mathbf{w}_0\in\mathbf{W}$ for every scalar $\alpha$. This happens if and only if $A\mathbf{w}_0\in\mathbf{W}$ (prove the equivalence). What does that tell you about $\mathbf{w}_0$?

*A $2$-dimensional invariant subspace. This would be of the form $\mathbf{W}=\{\alpha\mathbf{w}_1 +\beta\mathbf{w}_2\mid\alpha,\beta\in\mathbb{R}\}$. Such a subspace is invariant if and only if $A\mathbf{w}_1\in\mathbf{W}$ and $A\mathbf{w}_2\in\mathbf{W}_2$ (prove it). There are several ways this can happen in principle, but here, since $A$ is inverible, then $A\mathbf{w}_1$ and $A\mathbf{w}_2$ would have to span $\mathbf{W}$ itself, which reduces the possibilities somewhat.

*Analogous with $3$-dimensional invariant subspaces.
Here, $A$ is diagonalizable (in fact, diagonal). You know that
$A(a,b,c,d) = (a,2b,2c,3d)$. This makes it pretty straightforward to check when you get an invariant subspace by writing these hypothetical bases for the invariant subspaces, and seeing what it means for their images to lie in the space they span. 
Or even better, you can use an important theorem:
Theorem. Let $\mathbf{T}\colon\mathbf{V}\to\mathbf{V}$ be a linear operator on a finite dimensional vector space. If $\mathbf{T}$ is diagonalizable, and $\mathbf{W}$ is a $\mathbf{T}$-invariant subspace of $\mathbf{W}$, then the restriction of $\mathbf{T}$ to $\mathbf{W}$, $\mathbf{T}_{\mathbf{W}}$, is also diagonalizable.
This will tell you what the $2$- and $3$-dimensional invariant subspaces look like in terms of the $1$-dimensional subspaces.
(There are many proofs of the theorem; the least computational I know uses the facts that $\mathbf{T}$ is diagonalizable if and only its characteristic polynomial splits and the minimal polynomial is squarefree; and that the characteristic and minimal polynomials of the restriction of $\mathbf{T}$ to an invariant subspace divide the characteristic and minimal polynomials of $\mathbf{T}$, respectively). 
