# Determine the dimension and find a basis of a vector space

$$V_1 = (x_1, ..., x_7)^T \in \mathbb{Z}^7_{5} : x_1 + 3x_2 +x_3+2x_4+3x_5+x_6+2x_7 = 0$$

$$3x_1 + 4x_2 +3x_3+x_4+4x_5+2x_6+4x_7 = 0$$

$$2x_1 + x_2 +4x_3+4x_5+x_6+2x_7 = 0$$

I am supposed to find the dimension and some basis of this vector space.

After putting these equations in matrix form and doing gaussian elimination I got this matrix, but I don't know what to do now, any help would be appreciated $$\left(\begin{matrix} 1 & 3 & 1 & 2 & 3 & 1 & 2\\ 0 & 0 & 2 & 1 & 3 & 3& 3\\ 0 & 0 & 0 & 0 & 0 & 4 & 3\end{matrix}\right)$$

You have pivot positions corresponding to $$x_{1},x_{3},$$ and $$x_{6}$$. That means your matrix has rank $$3$$ so its null space, which is what we're after, has dimension $$7-3=4$$. Let's solve for the pivot variables in terms of the free ones. From the last equation, $$4x_{6}=-3x_{7}$$ can be rewritten $$-x_{6}=-3x_{7}$$ since we are in $$\mathbb{Z}_{5}$$. Now multiply both sides by $$-1$$ to get $$x_{6}=3x_{7}$$.
For the middle equation, we have $$2x_{3}=-x_{4}-3x_{5}-3x_{6}-3x_{7}$$ Multiplying both sides by $$3$$, and simplifying/rewriting mod $$5$$ gives $$x_{3}=2x_{4}+x_{5}+x_{6}+x_{7}$$ which, substituting in what we found previously, becomes $$x_{3}=2x_{4}+x_{5}+3x_{7}+x_{7}=2x_{4}+x_{5}+4x_{7}$$
Finally, repeat for the first equation. Starting with $$x_{1}=-3x_{2}-x_{3}-2x_{4}-3x_{5}-x_{6}-2x_{7}$$ substitute in for $$x_{3}$$ and $$x_{6}$$ to get \begin{align} x_{1} &= -3x_{2}-(2x_{4}+x_{5}+4x_{7})-2x_{4}-3x_{5}-3(x_{7})-2x_{7} \\ &= -3x_{2}-4x_{4}-4x_{5}-4x_{7}\\ &\equiv 2x_{2}+x_{4}+x_{5}+x_{7} \end{align}
Now we can conclude. The solution set is all vectors of the following form $$\begin{equation} \begin{pmatrix} x_{1}\\ x_{2}\\ x_{3}\\ x_{4}\\ x_{5}\\ x_{6}\\ x_{7}\\ \end{pmatrix} = \begin{pmatrix} 2x_{2}+x_{4}+x_{5}+x_{7}\\ x_{2}\\ 2x_{4}+x_{5}+4x_{7}\\ x_{4}\\ x_{5}\\ 3x_{7}\\ x_{7}\\ \end{pmatrix}= x_{2}\begin{pmatrix}2\\1\\0\\0\\0\\0\\0\\\end{pmatrix} +x_{4}\begin{pmatrix}1\\0\\2\\1\\0\\0\\0\end{pmatrix} +x_{5}\begin{pmatrix}1\\0\\1\\0\\1\\0\\0\end{pmatrix} +x_{7}\begin{pmatrix}1\\0\\1\\0\\0\\3\\1\end{pmatrix} \end{equation}$$
Therefore a basis is given by $$\begin{pmatrix}2\\1\\0\\0\\0\\0\\0\\\end{pmatrix},\begin{pmatrix}1\\0\\2\\1\\0\\0\\0\end{pmatrix},\begin{pmatrix}1\\0\\1\\0\\1\\0\\0\end{pmatrix},\begin{pmatrix}1\\0\\1\\0\\0\\3\\1\end{pmatrix}$$ and the dimension is $$4$$.