Dimension of the vector space of $3\times3$ real matrices with row and column sums equal to zero. Let $V$ be the real vector space consisting of all $3\times3$ real matrices
$$\left[\begin{array}{ccc}a_{11}&a_{12}&a_{13}\\a_{21}&a_{22}&a_{23}\\a_{31}&a_{31}&a_{33}\end{array}\right]$$
having row and column sums zero, i.e.
$$a_{i1}+a_{i2}+a_{i3}=a_{1j}+a_{2j}+a_{3j}=0$$
for all $i,j\in\{1,2,3\}$. Determine the dimension of $V$.
Intuitively, since row/column sums of zero implies that any element of $V$ has a maximum rank of $2$, then $V$ is dimension $2\times2$. I'm assuming some application of the rank-nullity theorem will produce this conclusion, but I'm unfamiliar with the generalized form of this theorem, and a brief Google search overwhelmed me.
 A: Hint. Use the equations you got to produce a nice linear map $\operatorname{Mat}_{3×3}(ℝ) → ℝ^3 × ℝ^3$ with kernel $V$, determine its image by evaluating it at a nice base of $\operatorname{Mat}_{3×3}(ℝ)$ and then apply the rank-nullity theorem, as you already suspected.
A: Your space is defined as the set of zeros of $6$ linear equations. Since the whole space (of the $3\times3$ matrices) has dimension $9$, this suggests that the dimension of your space is $3(=9-6)$. However, the six equations are not linear independent. For instance, you can deduce that $a_{31}+a_{32}+a_{33}=0$ from the other $5$ equations:\begin{align}a_{31}+a_{32}+a_{33}&=-a_{11}-a_{21}-a_{12}-a_{22}-a_{13}-a_{23}\\&=-\overbrace{(a_{11}+a_{12}+a_{13})}^{=0}-\overbrace{(a_{21}+a_{22}+a_{23})}^{=0}\\&=0.\end{align}A basis of $V$ is$$\left\{\begin{pmatrix}0&0&0\\1&0&-1\\-1&0&1\end{pmatrix},\begin{pmatrix}1&0&-1\\0&0&0\\-1&0&1\end{pmatrix},\begin{pmatrix}0&0&0\\0&1&-1\\0&-1&1\end{pmatrix},\begin{pmatrix}0&1&-1\\0&0&0\\0&-1&1\end{pmatrix}\right\}.$$ Can you take it from here?
A: You can freely choose the upper left $2\times2$ entries. Then all other entries are determined. It follows that ${\rm dim}(V)=4$.
