Kernel and Image with $\mathbb{F}=\mathbb{Z}_2$ and $\mathbb{F}=\mathbb{Z}_3$ Let $V$ a vectorial space with dimension $3$ over a field $\mathbb{F}$ and let $End(V)$ the space of the linear operators of $V$. If the operator $f \in End(V)$ represents the matrix
$$\begin{pmatrix}
             3 & -1 & 1 \\
             -1 & 5 & -1\\
             1 & -1 & 3\end{pmatrix},$$
in some basis of  $V$, calculate $dim_{\mathbb{F}}(Ker f)$ and $dim_{\mathbb{F}}(Im f)$ in:
$\mathbb{F}=\mathbb{Z}_2$.
$\mathbb{F}=\mathbb{Z}_3$.
Is it true in this cases that $V = Ker f \bigoplus Im f$ ?
I do not know if this procedure is correct....
For a) I got the matrix
$$\begin{pmatrix}
         3 & -1 & 1 \\
         -1 & 5 & -1\\
         1 & -1 & 3
         \end{pmatrix}
         =
         \begin{pmatrix}
         1 & -1 & 1 \\
         -1 & 1 & -1\\
         1 & -1 & 1
         \end{pmatrix}
         \to
         \begin{pmatrix}
         1 & -1 & 1 \\
         0 & 0 & 0\\
         0 & 0 & 0\end{pmatrix}$$
from here
$$kerf=\left\{\begin{pmatrix}
         1 \\
         1 \\
         0 \end{pmatrix} ,\begin{pmatrix}
         -1 \\
         0 \\
         1 \end{pmatrix} \right\},$$
hence
$$dim_{\mathbb{F}}(Ker f)=0.$$
For the dimension theorem
$$Im f=V,$$
hence,
$$dim_{\mathbb{F}}(Im f)=dim_{\mathbb{F}}(V)=1.$$
For $\mathbb{Z}_3$ I got lost as well.
Any help?
 A: Consider the matrix
$$A=\left(\begin{array}{rrr}
3 & -1 & 1\\
-1 & 5 & -1\\
1 & -1 & 3
\end{array}\right).$$
To find the dimension of the kernel, we proceed as usual: find the nullity of $A$; this is often done by figuring out the solution set to $A\mathbf{x}=\mathbf{0}$ and determining the number of free variables. And this is done via Gaussian elimination/row reduction.
When doing row reduction over an unspecified fied $\mathbb{F}$, one must keep in mind what the elementary row operations are:

*

*Exchanging rows can be done without concern about what $\mathbb{F}$ is.


*Adding a multiple of one row to another row has to be done a bit carefully, as "multiple" refers to scalars in $\mathbb{F}$. But usually, since the entries of the matrix must lie in $\mathbb{F}$, this is not a practical issue.


*Multiplying a row by a nonzero constant is an issue: we can only use scalars from $\mathbb{F}$, and they must not be zero.
Suppose we were working over $\mathbb{F}_2$: then we are not "allowed" to multipy the first row by $2$, because $2=0$ in $\mathbb{F}_2$. Similarly, if we are working over $\mathbb{F}_3$, then we are not allowed to "divide the first row by $3$", because $3=0$ in $\mathbb{F}_3$. So when doing row-reduction, one has to be mindful of exactly what kind of operations we are doing, to ensure they can be performed over $\mathbb{F}_2$ and/or over $\mathbb{F}_3$.
If we want to do row reduction of $A$, I would probably first exchange rows $1$ and $3$; add first row to second row, subtract three times the first row from the third row (we can do that even over $\mathbb{F}_3$, as that is like "add zero times the first row to the third row", which is a silly elementary row operation to do, but still a valid one):
$$\left(\begin{array}{rrr}
3 & -1 & 1\\
-1 & 5 & -1\\
1 & -1 & 3
\end{array}\right) \to \left(\begin{array}{rrr}
1 & -1 & 3\\
-1 & 5 & -1\\
3 & -1 & 1
\end{array}\right) \to \left(\begin{array}{rrr}
1 & -1 & 3\\
0 & 4 & 2\\
0 & 2 & -8
\end{array}\right).$$
Now: if we are working over $\mathbb{F}_2$, then $2=4=-8=0$, so the last two rows are actually rows of zeros. The matrix is already in row echelon form, and since $3=-1=1$ in $\mathbb{F}_2$, the row reduced matrix is
$$\left(\begin{array}{ccc}
1 & 1 & 1\\
0 & 0 & 0\\
0 & 0 & 0
\end{array}\right).$$
Which tells us that the dimension of the nullspace is $2$ (not $0$, as you claim), and the dimension of the image is $1$ (by the Rank-Nullity Theorem, aka the Dimension Theorem).
But if we are working over $\mathbb{F}_3$, then instead we have that $3=0$, $4=-8=1$, and $2=-1$, so the matrix is instead equal to
$$\left(\begin{array}{rrr}
1 & -1 & 0\\
0 & 1 & -1\\
0 & -1 & 1
\end{array}\right)$$
and now we see that the nullity is $1$ (as opposed to $2$ in the $\mathbb{F}_2$ case) and the rank is therefore $2$.
Note that $\dim(V)=3$ (I don't know where you got that the dimension is $1$... you have a $3\times 3$ matrix for an operator on $V$, so the bases have three vectors in them)
