I'm trying to prove that every subspace of $\mathbb{R}^n$ is a solution space of a homogeneous system of linear equation. I want to prove it without using orthogonal complement. So I found this question that has an answer :
Let $S$ a subspace of $\mathbb{R}^n$ and choose $(e_1,…,e_p)$ a basis of $S$ which we compete it by a basis $(e_1,…,e_p,e_{p+1},…,e_n)$ of $\mathbb{R}^n$.
Now let the endomorphism $f$ defined by $f(e_i)=0$, $ 1 \le i \le p$ and $f(e_i)=e_i, p+1 \le i \le n$ and let $A$ the matrix of $f$ in this basis then $AX=0\iff X\in S$.
My problem is finding the matrix $A$ and I also didn't unterstand the domain of the endomorphism. Is $f:\mathbb{R}^n \rightarrow \mathbb{R}^n$?