find a $n\times n$ real matrix whose minimal polynomial is $x^{n-1}$ I need to find a $n\times n$ real matrix whose minimal polynomial is $x^{n-1}$. I know this transformation with respect to the basis $\{v_1,\dots,v_n\}$ $$T(v_1)=v_2$$ $$T(v_2)=v_3$$ $$\dots\dots$$ $$T(v_{n-1})=v_n$$ $$T(v_n)=0$$ is nilpotent with characteristic polynomial $X^n$. 
Could any one help to how to solve the above one?
 A: For $n=1$ there is no solution (the only matrix with minimal polynomial $1$ is the $0\times 0$ matrix). Otherwise there is a solution, but not the $T$ in your question, which has $T^{n-1}\neq0$. Instead, you need the kernel of $T$ to be $2$-dimensional, which you can achieve for instance by changing the definition to have $T(v_1)=0$. The matrix of $T$ on the basis $v_1,\ldots,v_n$ then becomes
$$
\begin{pmatrix} 0&0&0&\ldots&0&0\\0&0&0&\ldots&0&0\\
0&1&0&\ldots&0&0\\0&0&1&\ldots&0&0\\\vdots&\vdots&\ddots&\ddots&0&0\\
0&0&0&\ldots&1&0\\
\end{pmatrix}.
$$
Another (equivalent) soultion is to define $T(v_{n-2})=0$ instead. In either case there is a vector $v_i$ with $T^{n-2}(v_i)\neq0$, but $T^{n-1}=0$.
To see that you must have $\dim(\ker T)=2$, consider the sequence $\dim(\ker T^i)$ for $i=0,1,\ldots,n-1$; it is weakly increasing, starts with $0$ and must end with numbers $d,n$ where $d<n$ (since $T^{n-2}\neq0$). Moreover, as a general fact, the "derived" sequence of its increments is weakly decreasing. It then follows that this derived sequence is $2,1,1,\ldots,1$ and the original sequence $0,2,3,4,\ldots,n-1,n$, in particular $\dim(\ker T^1)=2$.
The fact that the derived sequence is weakly decreasing follows because $T$ induces a map $\ker(T^{i+2})/\ker(T^{i+1})\to\ker(T^{i+1})/\ker(T^i)$ that can be checked to be always injective.
A: What about the following variant of the famous companion matrix ?:
$$\begin{pmatrix}0&1&0&0&\ldots&0\\0&0&1&0&\ldots&0\\...&...&...&...&...&...\\0&0&...&...&...&\;\;0\\0&0&0&0&\ldots&0\end{pmatrix}$$
which, of course, is almost the matrix of your linear operator: you just need to define $\,Tv_{n-1}=0\,$...
A: EDIT: following answer is invalid and is left here only to remind me to think before I answer. 
Look up "companion matrix." Given any polynomial $p$, the companion matrix of $p$ has minimal polynomial $p$. 
A: Hint: If $A=\begin{bmatrix}{0}&{0}&{1}&0\\{0}&{0}&{0}&1\\{0}&{0}&{0}&0\\{0}&{0}&{0}&0\end{bmatrix}$ then, $\mu_A(x)=x^3$. Generalize.
