Say we have matrix
$$M= \begin{pmatrix} 2 & 0 & 1 & -3\\ 0 & 2 & 4 & 8\\ 0 & 0 & 2 & 0\\ 0 & 0 & 0 & 3 \end{pmatrix}\DeclareMathOperator{\Id}{Id}$$
It follows that
$$\chi_{M}=(x-2)^{3}(x-3)$$
I found that $\ker(M-2\Id)=\{(1,0,0,0)^{T},(0,1,0,0)^{T}\}$, so dimension 2.
Similarly, we get dimension of $\ker(M-3\Id)=1$.
I want to focus on $ker(M-2\Id)$:
Looking at $ker(M-2Id)^{2}$, we get a basis of $\{(1,0,0,0)^{T},(0,1,0,0)^{T}, (0,0,1,0)^{T}\}$, so dimension 3.
In our notes, we have written down:
Find a vector $v \in \ker(M-2\Id)^{2}$, such that $v \notin \ker(M-2\Id)$. It follows that $Mv \in \ker(M-2\Id)$ ( First question, should this not be $(M-2\Id)v \in \ker(M-2\Id)?).$ How does this help us in terms of the Jordan Form? I'm not sure how invariant subspaces fit into all of this either, other than the fact $\ker(M-2\Id)\subset \ker(M-2\Id)^{2}$.
An intuitive explanation would be of great assistance.
$\DeclareMathOperator\ker{ker}\DeclareMathOperator\id{id}$Here's the idea: Denote by $H_i=\ker(f-\lambda\id)^i$ the generalized eigenspaces and note that they form a chain $H_1\subseteq H_2 \subseteq \cdots$. Pick a vector $v_k\in H_k\setminus H_{k-1}$. Now define the vectors $v_{k-1},\dots,v_1$ by letting $v_i = (f-\lambda\id)(v_{i+1})$ for $i=k-1,\dots,1$. Note that $v_i\in H_i\setminus H_{i-1}$. Hence, the vectors $v_1,\dots,v_k$ will be linearly independent and by construction we have \begin{align*} f(v_k) &= \lambda v_k + v_{k-1}, \\ f(v_{k-1}) &= \lambda v_{k-1} + v_{k-2}, \\ &\,\,\,\vdots\\ f(v_2) &= \lambda v_2 + v_1, \\ f(v_1) &= \lambda v_1. \end{align*} Thus, the subspace $U=\langle v_1,\dots,v_k\rangle$ is $f$-invariant and the matrix of $f$ on $U$ with respect to the basis $v_1,\dots,v_k$ is $$ \begin{pmatrix} \lambda & 1\\ &\lambda & 1 \\ & & \lambda \\ & & & \ddots & 1 \\ & & & & \lambda \end{pmatrix}. $$