Matrix with orthonormal base I have the two following given vectors:
$\vec{v_{1} }=\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}$
 $\vec{v_{2} }=\begin{pmatrix} 3 \\ 0 \\ -3 \end{pmatrix}  $
I have to calculate matrix $B$ so that these vectors in $\mathbb{R}^{3}$ construct an orthonormal basis.
The solution is: 
$$B=\begin{pmatrix} 0 & -\frac{\sqrt{2} }{2}  & \frac{\sqrt{2} }{2}  \\ 1 & 0 & 0 \\ 0 & -\frac{\sqrt{2} }{2}  & -\frac{\sqrt{2} }{2}   \end{pmatrix}$$
I really don't have any idea how to get this matrix. I'm also confused because I only have 2 vectors.

the two given vectors v1 and v2 spans a subspace of R3. to construct the matrix is just same as finding a set of orthonormal basis using the given two.
 now, here the given vectors are orthogonal to each other and the first vector has modulus 1. so, we shall normalize the second vector. 
now, let's name the subspace generated by these two vectors as H. to complete the solution we need to pick a vector from Hperp (the subspace consisting all vectors perpendicular to H) and normalize it to make a unit vector.
that can be done by first calculating H and then by picking a vector v from compliment of H in R3. then we apply gram-schmidt process to v to extract the vector part of Hperp out of v.then we can normalize it to make an orthonormal basis.
p.s. the answer you have given, is just one such matrix. there are other set of o.n. basis which satisfies the provided conditions.   
