Help with understanding the Gram-Schmidt Process 
Let $U=\langle x_1,x_2,x_3\rangle \subseteq \mathbb{R^4},$ where $$x_1=\begin {pmatrix} 3\\4 \\0\\0
\end {pmatrix}, \ x_2=\begin {pmatrix} 1\\3 \\1\\1 \end {pmatrix},\ x_3=\begin {pmatrix} 0\\5 \\5\\7 \end {pmatrix}.$$
Use the Gram-Schmidt Process to determine an orthogonal basis of $U$ with respect to the bilinear form given by the identity $I_4\in \mathbb{R^{4\times4}}$.

I think I understand the process at hand ok enough but I'm unsure of my work and need someone to check it. First I look at the Gram Matrix which is just the $4\times4 $ identity matrix. Then based on the definition of the Gram matrix I turn it into $ \mathfrak{b}(v_i,y_i)= v_1y_1+v_2y_2+v_3y_3+v_4y_4.$ Then I start looking at the actual process:
$$B'=\langle w_1,w_2,w_3\rangle \text{ where } w_1= \begin {pmatrix} 3\\4\\0\\0 \end {pmatrix} $$
$$w_2=x_2-\frac{\mathfrak{b}(x_2,w_1)}{\mathfrak{b}(w_1,w_1)}w_1 \implies w_2= \begin {pmatrix} 1\\3\\1\\1 \end {pmatrix} - \frac{(1 \times3)+(3\times4)+(1\times0)+(1\times0)}{(3\times3)+(4\times4)+(0\times0)+(0\times0)}\begin {pmatrix} 3\\4\\0\\0 \end {pmatrix}.$$
$$w_2= \begin {pmatrix} -4/5\\3/5\\1\\1 \end {pmatrix} $$
$$
w_3= \begin {pmatrix} 0\\5\\5\\7 \end {pmatrix} - \frac{(5\times4)}{25}\begin {pmatrix} 3\\4\\0\\0 \end {pmatrix}- \frac{(0)+(3)+(5)+(7)}{(16/25)+(9/25)+1+1} \begin {pmatrix} -4/5\\3/5\\1\\1 \end {pmatrix}$$
$$w_3= \begin {pmatrix} 8/5\\-6/5\\0\\2 \end {pmatrix},\ B'= \langle w_1,w_2,w_3\rangle.$$
What I'm most particularly unsure about is whether or not I had to turn the Gram matrix into a bilinear form and also I'm just generally unsure about what I've turned it into as well. I suspect I should actually be doing vector-matrix multiplication or something but I don't really know.
 A: Ah, well, the way that I would explain the Gram-Schmidt process, or at the very least, the way that I've always thought about it is, that when you're in your standard basis (for instance, in $\mathbb{R}^3$ with basis vectors $\vec{x}, \vec{y}, \vec{z}$) with your "ordinary" scalar product (in $\mathbb{R}^3$, $\langle \vec{x} , \vec{x} \rangle = \langle \vec{y} , \vec{y} \rangle = \langle \vec{z} , \vec{z} \rangle = 1$ and $\langle \vec{x} , \vec{y} \rangle = \langle \vec{x} , \vec{z} \rangle = \langle \vec{y} , \vec{z} \rangle = 0$, etc.) everything is nice and dandy. It's clean, at least. Very easy and systematic to work with. It's orthonormal.
But let's say that you're handed a new scalar product, $\langle \cdot , \cdot \rangle_{\text{New}}$, for which $\langle \vec{x} , \vec{y} \rangle_{\text{New}} \neq 0$ and $\langle \vec{x} , \vec{x} \rangle_{\text{New}} \neq 1$ (for example), how do you go about finding a new basis of your vector space so that in this new basis (in $\mathbb{R}^3$, call them $\vec{a}, \vec{b}, \vec{c}$) the new scalar product becomes the "ordinary" scalar product? (In $\mathbb{R}^3$, such that $\langle \vec{a} , \vec{a} \rangle_{\text{New}} = \langle \vec{b} , \vec{b} \rangle_{\text{New}} = \langle \vec{c} , \vec{c} \rangle_{\text{New}} = 1$ and $\langle \vec{a} , \vec{b} \rangle_{\text{New}} = \langle \vec{a} , \vec{c} \rangle_{\text{New}} = \langle \vec{b} , \vec{c} \rangle_{\text{New}} = 0$, etc.)
Well, this is where the Gram-Schmidt process comes in handy!
To illustrate, consider the example of real three-dimensional space as above.
The vectors in your original base are $\vec{x} , \vec{y}, \vec{z}$. We now wish to construct a new base with respect to the scalar product $\langle \cdot , \cdot \rangle_{\text{New}}$. How to go about?
Well, first off, what's wrong with $\vec{x}$? Why couldn't that be a vector in our basis? It isn't the nilvector, after all. Only problem is that it is not necessarily normalized with respect to our new scalar product! That is to say, we do not necessarily have that
$$\langle \vec{x} , \vec{x} \rangle_{\text{New}} = 1.$$
But, no need to be alarmed! All we need to do is to normalize it! If we put
$$\vec{a} = \frac{1}{\sqrt{\langle \vec{x} , \vec{x} \rangle_{\text{New}}}} \vec{x},$$
then clearly,
$$\langle \vec{a} , \vec{a} \rangle_{\text{New}} = \langle \frac{1}{\sqrt{\langle \vec{x} , \vec{x} \rangle_{\text{New}}}} \vec{x} , \frac{1}{\sqrt{\langle \vec{x} , \vec{x} \rangle_{\text{New}}}} \vec{x} \rangle_{\text{New}} = \frac{1}{ \langle \vec{x} , \vec{x} \rangle } \langle \vec{x} , \vec{x} \rangle = 1,$$
and so we have our first basis vector in our new basis in $\vec{a}$. But, we're in three-dimensional space, so we need two more!
What's wrong with $\vec{y}$?
Well, we actually have two problems here! First of all, it is far from guaranteed that $\langle \vec{a} , \vec{y} \rangle_{\text{New}} = 0$. However, we do know now that $\langle \vec{a} , \vec{a} \rangle_{\text{New}} = 1$. Since scalar products respects addition and subtraction and scalar multiplication, it follows that if we put
$$\vec{\beta} = \vec{y} - \langle \vec{a} , \vec{y} \rangle_{\text{New}} \vec{a},$$
then,
$$\langle \vec{a} , \vec{\beta} \rangle_{\text{New}} = \langle \vec{a} , \vec{y} - \langle \vec{a} , \vec{y} \rangle_{\text{New}} \vec{a} \rangle_{\text{New}} = \langle \vec{a} , \vec{y} \rangle_{\text{New}} - \langle \vec{a} , \vec{y} \rangle_{\text{New}} \langle \vec{a} , \vec{a} \rangle_{\text{New}} = \langle \vec{a} , \vec{y} \rangle_{\text{New}} - \langle \vec{a} , \vec{y} \rangle_{\text{New}} = 0 ,$$
so now at least we can say that $\vec{a}$ and $\vec{\beta}$ are orthogonal. But we need our basis to be orthonormal. That is to say, we need to normalize $\vec{\beta}$ with respect to our new scalar product.
But that's easy! It's the same procedure as for constructing $\vec{a}$ out of $\vec{x}$. Just put
$$\vec{b} = \frac{1}{\sqrt{\langle \vec{\beta} , \vec{\beta} \rangle_{\text{New}}}} \vec{\beta},$$
and it follows that
$$\langle \vec{b} , \vec{b} \rangle_{\text{New}} = 1 .$$
Since $\vec{\beta}$ was orthogonal to $\vec{a}$, it follows that $\vec{b}$ also is! So now we have two orthonormal basis vectors!
But this is three-dimensional space, so we need another!
Well, you might ask, what's wrong with $\vec{z}$? Well, again, as with $\vec{y}$, we have two problems: orthogonality and normality.
We don't necessarily have that $\langle \vec{z} , \vec{a} \rangle_{\text{New}} = \langle \vec{z} , \vec{b} \rangle_{\text{New}} = 0$. But there's no problem here, we just need to apply the same approach as before, only now with respect to two vectors, $\vec{a}$ and $\vec{b}$! We know that $\langle \vec{a} , \vec{a} \rangle_{\text{New}} = \langle \vec{b} , \vec{b} \rangle_{\text{New}} = 1$ and $\langle \vec{a} , \vec{b} \rangle_{\text{New}} = 0$, so if we put
$$\vec{\gamma} = \vec{z} - \langle \vec{a} , \vec{z} \rangle_{\text{New}} \vec{a} - \langle \vec{b} , \vec{z} \rangle_{\text{New}} \vec{b} ,$$
then it follows that
$$\langle \vec{a}, \vec{\gamma} \rangle_{\text{New}} = \langle \vec{a} , \vec{z} \rangle_{\text{New}} - \langle \vec{a}, \vec{z} \rangle_{\text{New}} \langle \vec{a} , \vec{a} \rangle_{\text{New}} - \langle \vec{b} , \vec{z} \rangle_{\text{New}} \langle \vec{a} , \vec{b} \rangle_{\text{New}} = \langle \vec{a},\vec{z} \rangle_{\text{New}} - \langle \vec{a},\vec{z} \rangle_{\text{New}} - 0 = 0,$$
and
$$\langle \vec{b}, \vec{\gamma} \rangle_{\text{New}} = \langle \vec{b} , \vec{z} \rangle_{\text{New}} - \langle \vec{a}, \vec{z} \rangle_{\text{New}} \langle \vec{b} , \vec{a} \rangle_{\text{New}} - \langle \vec{b} , \vec{z} \rangle_{\text{New}} \langle \vec{b} , \vec{b} \rangle_{\text{New}} = \langle \vec{b},\vec{z} \rangle_{\text{New}} - 0 - \langle \vec{b},\vec{z} \rangle_{\text{New}}= 0,$$
and now all you have to do is to normalize! Put
$$\vec{c} = \frac{1}{\sqrt{\langle \vec{\gamma} , \vec{\gamma} \rangle_{\text{New}}}} \vec{\gamma},$$
and in $\vec{a}, \vec{b}, \vec{c}$, you now have your desired orthonormal basis with respect to your new scalar product!
(Now, here I started with the standard basis $\vec{x}, \vec{y}, \vec{z}$, of course, but you could start with basically any set of three linearly independent vectors in $\mathbb{R}^3$ that you want. The process is one of, starting with a basis, to obtain a new basis which is orthonormal with respect to a certain scalar product.)
It should be easy for you from this information to extend and generalize the Gram-Schmidt method to all sorts of vector spaces, regardless what fields they are over, or how many dimensions they have!
But what about your specific example then?
Well, you're looking at a three-dimensional subspace of $\mathbb{R}^4$ spanned by the three vectors $\vec{x}_1, \vec{x}_2, \vec{x}_3$, and the text says that the scalar product is given in terms of the bilinear form given by the identity matrix $I_4 \in \mathbb{R}^{4 \times 4}$, so it looks like this:
$$\langle \begin{pmatrix} x \\ y \\ z \\ w \end{pmatrix} , \begin{pmatrix} a \\ b \\ c \\ d \end{pmatrix} \rangle_{\text{New}} = \begin{pmatrix} x & y & z & w \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} a \\ b \\ c \\ d \end{pmatrix} = xa + yb + zc + wd,$$
so, in terms of your vectors, we have
$$\langle \vec{x}_1 , \vec{x}_2 \rangle_{\text{New}} = 3+12+0+0=15,$$
and
$$\langle \vec{x}_1 , \vec{x}_3 \rangle_{\text{New}} = 0+20+0+0=20,$$
and
$$\langle \vec{x}_2 , \vec{x}_3 \rangle_{\text{New}} = 0+15+5+7=27,$$
and from hereon, I have no doubt that you should know perfectly well how to continue!
I wish you the best of luck!
A: I will write $x_{1},x_{2}$ and $x_{3}$ as $v_{1},v_{2}$ and $v_{3}$ respectively. Now, technically we need to use Gram-Schmidt Process to determine an orthogonal basis of $U$ using the dot product defined in $\mathbb{R}^{4}$. The Gram-Schmidt algorithm is described here deleting the step of normalization (if no we will get an "ortho+normal" basis for $U$) for this problem, so we need calculate:

*

*$\tilde{v}_{1}=v_{1}$.

*$\tilde{v}_{2}=v_{2}-\langle v_{2},\tilde{v}_{1}\rangle \tilde{v}_{1}$.

*$\tilde{v}_{3}=v_{3}-\langle v_{3},\tilde{v}_{2}\rangle \tilde{v}_{2}-\langle v_{3},\tilde{v}_{1}\rangle \tilde{v}_{1}$.

Where the notation $\langle \cdot, \cdot \rangle$ denote in this case the dot product in $\mathbb{R}^{4}$. Then by Gram-Schmidt algorithm a basis orthogonal for $U$ will be given by $\{\tilde{v}_{1},\tilde{v}_{2},\tilde{v}_{3}\}$.
The operational part is as follows:

*

*Find $\tilde{v}_{1}$: $$\tilde{v}_{1}=\begin{bmatrix} 3\\4\\0\\0\end{bmatrix}$$


*Find $\tilde{v}_{2}$: $$\tilde{v}_{2}=\begin{bmatrix}1\\3\\1\\1\end{bmatrix}-\left\langle \begin{bmatrix}1\\3\\1\\1\end{bmatrix},\begin{bmatrix} 3\\4\\0\\0\end{bmatrix}\right\rangle  \begin{bmatrix} 3\\4\\0\\0\end{bmatrix}$$


*Find $\tilde{v}_{3}$:
$$\tilde{v}_{3}=\begin{bmatrix}0\\5\\5\\7\end{bmatrix}-\left\langle \begin{bmatrix}0\\5\\5\\7\end{bmatrix}, \begin{bmatrix} -44\\-57\\1\\1\end{bmatrix}\right\rangle \begin{bmatrix} -44\\-57\\1\\1\end{bmatrix}  -\left\langle \begin{bmatrix}0\\5\\5\\7\end{bmatrix},\begin{bmatrix} 3\\4\\0\\0\end{bmatrix} \right\rangle \begin{bmatrix} 3\\4\\0\\0\end{bmatrix}$$
Then by Gram-Schmidt algorithm the set
$$\left\{\tilde{v}_{1},\tilde{v}_{2},\tilde{v}_{3}, \right\}$$
is a basis orthogonal for $U$, that is, the basis must satisfies
$$\langle \tilde{v}_{1},\tilde{v}_{2}\rangle=0,\quad \langle \tilde{v}_{1},\tilde{v}_{3}\rangle=0,\quad \langle \tilde{v}_{2},\tilde{v}_{2}\rangle=0.$$
However if we use all the algorithm described in here the calculations is more easy and we get an orthonormal basis for $U$ give by
$$\left\{u_{1},u_{2},u_{3},\right\}=\left\{\begin{bmatrix}\frac{3}{5}\\\frac{4}{5}\\0\\0\end{bmatrix},\begin{bmatrix}-\frac{4}{5\sqrt{3}}\\\frac{\sqrt{3}}{5}\\\frac{1}{\sqrt{3}}\\\frac{1}{\sqrt{3}}\end{bmatrix},\begin{bmatrix}\frac{2\sqrt{2}}{5}\\-\frac{3}{5\sqrt{2}}\\0\\\frac{1}{\sqrt{2}}\end{bmatrix}\right\}$$
Here, we also have
$$\langle u_{1},u_{2}\rangle=0,\quad \langle u_{1},u_{2}\rangle=0,\quad \langle u_{2},u_{3}\rangle=0$$
and
$$||u_{1}||=0,\quad ||u_{2}||=0,\quad ||u_{3}||=0.$$
