# What is the dimension of a subspace containing $(1,1,1)$?

Say $$S=\{{(x,y,z):x=y=z}\}$$, then every vector in $$s \in S$$ can be represented as $$\lambda \cdot (1,1,1)$$ with $$\lambda \in R$$. Vector $$(1,1,1)$$ is trivially independent since it is not zero. Also, $$sp(\{(1,1,1)\})=S$$. This tells us that $$(1,1,1)$$ is a basis of $$S$$ and $$\dim (S)=1$$. However, I can continue the decomposition: $$s = \begin{pmatrix}\lambda\\0\\0\end{pmatrix} + \begin{pmatrix}0\\\lambda\\0\end{pmatrix}+\begin{pmatrix}0\\0\\\lambda\end{pmatrix}$$ These vectors are obviously independent and span $$S$$ as well. So $$\dim (S) = 3$$, but we just saw that $$\dim (S) = 1$$. What is the right answer ? Thank you.

The vectors $$\begin{pmatrix}\lambda\\ 0\\ 0\end{pmatrix}$$, $$\begin{pmatrix}0\\ \lambda\\ 0\end{pmatrix}$$, $$\begin{pmatrix}0\\ 0\\ \lambda\end{pmatrix}$$ are not in $$S$$ for nonzero $$\lambda$$.
• @Kreol Sure. See here for an example given some vectors. In your example, if we allow say, $\pmatrix{1 \\0\\ 0},\pmatrix{0 \\ 1\\ 0},\pmatrix{0 \\ 0\\ 1}$ to be in $S$, then $S$ would no longer be closed under vector addition and scalar multiplication. In general you can find some set of vectors that are in $S$ that span $S$, then check if they are linearly independent by reducing the matrix with rows as said vectors. Commented Aug 3, 2019 at 14:18