Suppose that $V$ is a vector space and $x_1,x_2,\dots,x_n$ is a basis for $V$ and $T:V\rightarrow V$ is a linear transformation such that
$$T(x_1)=x_2\;,\; T(x_2)=x_3\;,\;\dots\;,\;T(x_{n-1)}=x_n\;,\;T(x_n)=0$$
Then find $n(T)$.
I have solved this for a special case assuming that the basis is the standard basis of $V$ but don't know how to solve it in the general case where the basis of $V$ is arbitrary. So suppose the basis is:
$$x_1=\begin{pmatrix}1\\0\\ \vdots\\0\\0\end{pmatrix}\qquad x_2=\begin{pmatrix}0\\1\\ \vdots\\0\\0\end{pmatrix}\qquad\dots\qquad x_{n-1}=\begin{pmatrix}0\\0\\ \vdots \\1\\0\end{pmatrix}\qquad x_n=\begin{pmatrix}0\\0\\ \vdots\\0\\1\end{pmatrix}$$
So if we write the transfotmation matrix $T_{n\times n}$, it will be of the form:
$$T=\begin{pmatrix}0&0&0&\cdots&0&0&0\\
1&0&0&\cdots&0&0&0\\
0&1&0&\cdots&0&0&0\\
\vdots&\vdots&\ddots&\ddots&\vdots&\vdots&\vdots\\
0&0&0&\cdots&0&0&0\\
0&0&0&\cdots&1&0&0\\
0&0&0&\cdots&0&1&0\end{pmatrix}$$
You see the $1^{th}$ row and $n^{th}$ column of $T$ is zero and the remaining submatrix is a $(n-1)\times (n-1)$ identity matrix with $determinant = 1$
From the definition we now that the $rank$ of a matrix is the size of the bigest submatrix with nonzero determinant so $r(T)=n-1$ we know that
$$r(T)+n(T)=number\, of\, columns$$ so
$$n(T)=1$$
Could you please help me solve the problem in the general case where the basis $x_1,x_2,\dots x_n$ is chosen arbitrarily and is not essentially the standard basis of the vector space $V$ ?