Condition on scalars if $M$ is a subspace of $\mathbb R^n$

Let $$\alpha_1,...,\alpha_n,\beta\in$$ field $$\mathbb R.$$ Which properties should the given scalars have so that $$M=\{(x_1,...x_n)\in \mathbb R^n: \displaystyle\sum_{i=1}^{n} \alpha_ix_i=\beta\}$$

would be the subspace of $$\mathbb R^n$$?

Find the dimension of $$M$$.

I know that the subspace must include all the linear combinations of its elements (vectors). First, I checked if it is closed under adition. I planned to check for the multiplication in the next step, but it really got complicated. I used some vectors $$x$$ and $$y$$ and scalars $$\alpha$$ and $$\gamma$$ for each. After that I used $$\lambda_i$$ for their sum and got (after the coordinate adition), since I wrote the first coordinate in respect to the constraint: $$\lambda_1\gamma_1\alpha_i +\lambda_1\alpha_1\gamma_i=\alpha_1\gamma_1\lambda_1$$. May I ask for suggestion?

• $M$ is a subspace iff $\beta=0$ and the dimension is $n-1$ or $n$ according as $\alpha_i$ are all $0$ or one of then is non-zero. – Kavi Rama Murthy Nov 7 '19 at 12:40

A subspace must always contain the zero vector; this means (after a trivial computation) that $$\beta=0$$ is a necessary condition. You may check that the condition is also sufficient, as the solution of a linear homogeneous equation (or of a system of such equations) is always a subspace.