# Find the nullity of a linear operator

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$ ?

When does $T$ map to $0$?

Consider $a = a_1x_1 + a_2x_2 + ... + a_nx_n$ such that $T(a) = 0 = 0x_1 + ... + 0x_n$. Then, $$T(a_1x_1) = a_1T(x_1) = a_1x_2 \\ T(a_2x_2) = a_2T(x_2) = a_2x_3 \\ ... \\ T(a_{n-1}x_{n-1}) = a_{n-1}T(x_{n-1}) = a_{n-1}x_n \\ T(a_nx_n) = a_nT(x_n) = 0$$ Equation coefficients we have $a_1 = ... = a_{n-1} = 0$ and $a_n$ is arbitrary. Thus, the null space of T is the span of $\{x_n\}$.

What you did is not really a special case. With $x_1,...,x_n$ as basis, the standard matrix can be obtained by writing $T(x_i)$ as columns. It is exactly the matrix you have. So the nullity is $1$.

If you just want to compute the nullity, then you can notice that the range is generated by $x_2,x_3,\dots,x_n$, because

1. a spanning set for the range is always $\{T(v_1),T(v_2),\dots,T(v_n)\}$ for any basis $\{v_1,\dots,v_n\}$ of the domain

2. removing the zero vector from a spanning set leaves a spanning set

So $\{x_2,\dots,x_n\}$ is a basis of the range (because it's a linearly independent spanning set) and the rank-nullity theorem says $$\operatorname{null}(T)=n-\operatorname{rank}(T)=n-(n-1)=1$$