Let $A$ be an $n \times n$ matrix over a field $F$. Let $d(A)$ be the largest non-negative integer such that the matrices $Id, A, A^2,\ldots,A^{d(A)}$ are linearly independent in the vector space of all $n \times n$ matrices over $F$.
Then, $A$ cannot satisfy any non-zero polynomial in $F[X]$ of degree $\leq d(A)$. But, since $Id, A, A^2,\ldots,A^{d(A)+1}$ are linearly dependent, $A$ satsifies some degree $d(A)+1$ polynomial over $F$. Hence, $d(A)+1$ is the degree of the minimal polynomial of $A$ over $F$.
Also, $d(A)$ is the dimension of the vector space spanned by the powers of $A$.
Additionally, because $A$ satisfies its characteristic polynomial which has degree $n$, hence $d(A) \leq n-1$.
Now, the question arises:
How to find $d(A)$ for a given matrix $A$?
One way to find a lower bound is to find a vector $X \in F^n$ such that $X, AX, \ldots, A^d X$ are linearly independent over $F$; this would mean that $Id, A,...,A^d$ are linearly independent as well, and hence $d(A) \geq d$.
Here are some examples where this method can be used:
Example 1: Let $A$ be the companion matrix of a degree $n$ monic polynomial $f(X) = a_0 + a_1 X +\ldots a_{n-1}X^{n-1}+X^n \in F[X]$. Then, $A$ is given by: $$A= \begin{pmatrix}0 & 0 & \cdots & 0 & -a_0 \\ 1 & 0 & \cdots & 0 & -a_1 \\ 0 & 1 & \cdots & 0 & -a_2 \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 1 & -a_{n-1} \end{pmatrix}$$ Now, let $e_i \in F^n$ be the vector with $1$ in the $i$th position and $0$ everywhere else, for each $i$ from $1$ to $n$ . Then, it can be checked that $Ae_1=e_2$, $A^2e_1=Ae_2=e_3$, $\ldots$ , and $A^{n-1}e_1=e_n$. Since, $e_1,\ldots,e_n$ are linearly independents, so are $Id,A,.\ldots,A^{n-1}$, giving us $d(A)\geq n-1$. Also, $d(A)\leq n-1$ as explained earlier. Hence, $d(A)=n-1$. Thus, the degee of the minimal polynomial is $n$, which is the same as the dergee of its characteristic polynomial, and since the former divides the latter, and both are monic of same degree, they are equal.
Example 2: Let $V$ be the vector space of polnomials in $F[X]$ of degree at most $n-1$. Then, $V$ is an $n$ dimensional vector space over $F$. Let $T: V \rightarrow V$ be the linear map which maps a polynomial $p(X)$ to $p(X+1)$. Assume that $char(F)=0$, and consider $p(X)=(X+1)(X+2)\cdots(X+n-1)\in V$. Then, $T(p)(X)=(X+2)(X+3)\cdots(X+n), \ldots , T^{n-1}(p)(X)=(X+n)(X+n+1)\cdots(X+2n-2)$. Suppose that $a_0 p(X) + a_1 T(p)(X) + \ldots a_{n-1} T^{n-1}(p)(X) = 0 \in F[X]$. Evaluating the LHS at $-n$ gives $a_0=0$, evaluating the LHS at $-(n+1)$ gives $a_1=0$, and so on. Hence, the $Id, T, \ldots, T^{n-1}$ are linearly independent. Thus, $d(T)\geq n-1$. Hence, $d(A)=n-1$, and its minimal polynomial equals its characteristic polynomial, and the same holds for the matrix representation of $T$ with respect to any basis of $V$.
It turns out this method will always work to find $d(A)$, in the sense that we can always find $X$ such that $X,AX,\ldots,A^{d(A)}X$ are linearly independent. To prove this, consider the rational canonical form $R$ of A, which is of the form $P A P^{-1}=R=diag(D_1,\ldots,D_r)$, a block diagonal matrix with diagonal blocks $D_1,\ldots,D_r$, where each $D_i$ is the companion matrix of a polynomial $f_i(X) \in F[X]$, such that $f_1 \mid f_2 \mid \ldots \mid f_r$, and $f_r$ is the minimal polynomial of $A$, of degree $d(A)+1$. In the notation of example 1, it can be seen that $Re_{n-d(A)}=e_{n-d(A)+1},\ R^2 e_{n-d(A)}=e_{n-d(A)+2},\ldots,R^{d(A)}e_{n-d(A)}=e_n$, which are linearly independent, and hence $X=P^{-1}e_{n-d(A)}$ works as needed.
Question: Are there other nice examples of (families of) matrices or linear transformations where there is a nice choice of $X$ that makes it easy to find $d(A)$, like examples 1 and 2 above? (If so, please post them as answers, so that they can be collected in the answers to this question).
Further, given $A$ and $d(A)$, is there a systematic way to find an X such that $X,AX,\ldots,A^{d(A)} X$ are linearly independent, without having to compute the rational canonical form? Can anything be said about the space of $X's$ that work, or the space of those that do not work?