How could you know, given a linear application $f:\mathbb R^n\to\mathbb R^n$, the $f-$invariant subspaces of arbitrary dimension? For example, let $f:\mathbb R^4\to\mathbb R^4$ with associated matrix: $$A=\begin{pmatrix}1&1&0&0\\0&1&1&0\\0&0&1&0\\0&0&0&-1\end{pmatrix}$$ How can I know the $f-$invariant planes, and be sure that there's no more?
Is there a systematic way to find them? I'm considering the case that $f$ is not diagonalizable.
If your matrix is in Jordan form, then it's fairly easy to enumerate all the invariant $n$-dimensional subspaces. That's because the columns $v_1,\dotsc,v_k$ of each Jordan block are a basis for a flag of invariant spaces, i.e. (in this case) a sequence of invariant subspaces $$ V_1 \subset V_2 \subset \dotsc \subset V_k $$ where each $V_i$ has dimension $i$. Furthermore this flag has the additional property that no subset of $\{v_{i+1},\dotsc,v_j\}$ spans an invariant subspace of dimension less than or equal to $i$.
Thus the invariant planes are exactly those spanned by the first two vectors of each invariant block and those spanned by the first vectors of each pair of different blocks. In your example there are only two such planes: $$ \left\langle \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \end{pmatrix} \right\rangle \qquad \text{and} \qquad \left\langle \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 0 \\ -1 \end{pmatrix} \right\rangle $$