find a basis for $\Bbb{R}^3$ that contains the vector $[1,0,1]$ I have the answer which is $\{[1,0,1],[1,0,0],[0,1,0]\}$. but my question is how to come up with the values? is it by trial and error? or is there a method?
 A: Given any vector $v\in\mathbb{R}^3\setminus\{(0,0,0)\}$, at least one of these sets will be a basis of $\mathbb R^3$:


*

*$\{v,(1,0,0),(0,1,0)\}$;

*$\{v,(1,0,0),(0,0,1)\}$;

*$\{v,(0,1,0),(0,0,1)\}$.


In order to check for each of them whether or not it is a basis, just compute the determinant of the matrix whose rows are the entries of the three vectors; the three vectors will form a basis if and only if that determinant is different from $0$.
A: Ad hoc approach since we are working in $\mathbb{R}^3$.
Clearly $\{(1,0,1),(1,0,0)\}$ is linearly independent since the vectors aren't multiples of each other. Now calculate their cross product:
$$(1,0,1) \times (1,0,0) = (0,1,0)$$
We conclude that $(0,1,0)$ is orthogonal to $\{(1,0,1),(1,0,0)\}$ so $$\{(1,0,1),(1,0,0),(0,1,0)\}$$ is a basis for $\mathbb{R}^3$.
A: There is a method. Start with one vector (in your case $v_1 = (1,0,1) \in \mathbb{R}^3$) and consider the $1$-dimensional subspace $U_1 \subset \mathbb{R}^3$ generated by $v_1$, i.e. we have $U_1 = \lbrace (x,0,x) \in \mathbb{R}^3\mid x \in \mathbb{R} \rbrace$. This is the set of all vectors that you can get as linear combinations of $v_1$, i.e. for all vectors $v \in \mathbb{R}^3 \setminus U_1$ we have that $v_1,v$ are linear independent. Therefore we can choose an arbitrary vector from $\mathbb{R}^3 \setminus U_1$ (in your case you found $v_2 = (1,0,0)  \in \mathbb{R}^3 \setminus U_1$). Now consider the $2$-dimensional subspace $U_2 \subset \mathbb{R}^3$ generated by $v_1,v_2$ and repeat everything. In the end (when you generate $\mathbb{R}^3$) you will have a basis.
As some of the comments mentioned, you will rather try and error with the standard basis vectors or simple modifications though.
A: Call given vector as $v$. Then $\{v\}$ is independent, so it can be extented to a basis for $\Bbb R^3$. Now the question is: how to extend? Take any spanning set of $\Bbb R^3$. In particular take the standard basis vectors. Now $(1,0,0)$ is not a multiple of $v$, so these two are independent. Thus add $(1,0,0)$ to your list. Next $(0,1,0)$ is not a linear combination of $v$ and $(1,0,0)$, so add $(0,1,0)$ to your list. Now we have three independent vectors and the dimension of $\Bbb R^3$ is three, so these vectors form a basis!
