Gram-Schmidt Process derivation question 
I have a problem with this derivation I hope you can help me with:
so we have constructed $w_{m+1}$ such that $g(w_{m+1},w_{m+1}) = 1$ and 0 otherwise, and we have show that $w_{m+1}$ is well defined, but then the lecturer goes on to say that the set $\{w_1,...,w_{m+1},v_{m+2},...,v_n\}$ also is a basis for the vectorspace $V$. I don't understand how/why we can replace $v_{m+1}$ by $w_{m+1}$?
 A: The whole idea behind the Gram-Schmidt Process is that we take an already known basis $\{v_1,\ldots v_n\}$ and construct an orthogonal (or orthonormal) basis $\{w_1,\ldots w_n\}$ from it. The way you do this is recursively through the known basis: start with the first vector $v_1$ and normalize it to get $w_1$. Then, since the second vector $v_2$ is linearly independent of $v_1$ (and thus $w_1$), we can subtract the projection of $v_2$ onto $v_1$ from $v_2$ to get a vector completely orthogonal to $v_1$. (If you are having trouble with this concept, think about it and draw a picture. If this is obvious to you already, then read ahead.) Normalize this vector to get $w_2$. Note now that $\{w_1,w_2\}$ has the same span as $\{v_1,v_2\}$, so they are both basis for a given subspace; it is just that the new one is orthonormal. We continue like this, taking the third vector $v_3$, subtracting its projection onto $w_1$ and $w_2$ from it (note that we must use the $w$ vectors because they are orthogonal) and normalizing to get $w_3$. This is the general process you have outlined above.
To go on to answer your question, we can replace $v_{m+1}$ by $w_{m+1}$ because the resulting set of vectors will still give the same span as before, and since the number of vectors is the same, they will still form a basis. Why do we do this replacing? It is because vector by vector, we are making more of the original set orthonormal, until the entire set is an orthonormal basis.
If you have any further questions or if anything was unclear, just comment.
