# If we assume that the definition of the inner product of the normalized vectors hatu_1 and hatu_2 is 2u_1^2 + u_2^2 (these are vector components), how do you use the Gram-Schmidt process to generate orthonormal vectors from vecv_1 and vecv_2?

## ${\vec{v}}_{1} = \left(2 , 1\right)$ ${\vec{v}}_{2} = \left(5 , - 7\right)$

Jul 31, 2017

See below.

#### Explanation:

Following the Gram-Schmidt orthonormalization process, given $\left\{{\vec{u}}_{1} , {\vec{u}}_{2}\right\}$ we begin by one of then, for instance ${\vec{u}}_{1}$ and define

${\vec{v}}_{1} = \frac{{\vec{u}}_{1}}{\left\lVert {\vec{u}}_{1} \right\rVert} _ q$

and then

${\vec{v}}_{2} = \frac{{\vec{u}}_{2} - {\left\langle{\vec{u}}_{2} , {\vec{v}}_{1}\right\rangle}_{q} {\vec{v}}_{1}}{\left\lVert {\vec{u}}_{2} - {\left\langle{\vec{u}}_{2} , {\vec{v}}_{1}\right\rangle}_{q} {\vec{v}}_{1} \right\rVert} _ q$

so if

$\left\{\begin{matrix}{\vec{u}}_{1} = \left(2 1\right) \\ {\vec{u}}_{2} = \left(5 - 7\right)\end{matrix}\right.$

we obtain

$\left\{\begin{matrix}{\vec{v}}_{1} = \left(\frac{2}{3} \frac{1}{3}\right) \\ {\vec{v}}_{2} = \left(\frac{\sqrt{2}}{3} - \frac{2 \sqrt{2}}{3}\right)\end{matrix}\right.$

NOTE: Here ${\left\langle\cdot , \cdot\right\rangle}_{q}$ applied to two vectors $\vec{u} , \vec{v}$ gives $\left\langle\vec{u} , q \cdot \vec{v}\right\rangle$ and

${\left\lVert \vec{u} \right\rVert}_{q} = \sqrt{\left\langle\vec{u} , q \cdot \vec{u}\right\rangle}$ with $q$ a definite positive matrix.

In the present case $q = \left(\begin{matrix}2 & 0 \\ 0 & 1\end{matrix}\right)$

Jul 31, 2017

I did your question from the beginning and got:

${\hat{u}}_{1} = \left(\frac{2}{3} , \frac{1}{3}\right)$

${\hat{u}}_{2} = \left(\frac{1}{3 \sqrt{2}} , - \frac{4}{3 \sqrt{2}}\right)$

The Gram-Schmidt process for two vectors first involves orthogonalizing them:

${\vec{u}}_{1} = {\vec{v}}_{1}$, $\text{ "" "" "" "" "" "" } {\hat{u}}_{1} = {\vec{u}}_{1} / | | {\vec{u}}_{1} | |$

${\vec{u}}_{2} = {\vec{v}}_{2} - {\text{proj}}_{{\vec{u}}_{1}} {\vec{v}}_{2}$, $\text{ "" } {\hat{u}}_{2} = {\vec{u}}_{2} / | | {\vec{u}}_{2} | |$

And if you had more than two vectors ${\vec{u}}_{i}$, you would match the subscript of ${\vec{u}}_{i}$ with ${\vec{v}}_{i}$, then sequentially subtract the projection of the current ${\vec{v}}_{i}$ (highest index $i$) onto the previous ${\vec{u}}_{i}$'s.

You have been given

• ${\vec{v}}_{1} = \left(2 , 1\right)$
• ${\vec{v}}_{2} = \left(5 , - 7\right)$

Now, you already have ${\hat{u}}_{1}$. Due to the definition of your inner product, the norm is not the usual definition (difference highlighted in red):

$| | \vec{u} | {|}^{2} = \left\langle\vec{u} , \vec{u}\right\rangle = \textcolor{red}{2} {u}_{1} {u}_{1} + {u}_{2} {u}_{2}$

=> color(blue)(hatu_1) = ((2", "1))/(sqrt(color(red)(2) xx (2)^2 + 1^2)) = ulcolor(blue)((2/3, 1/3)" "),

To proceed, we define the projection of $\boldsymbol{{\vec{v}}_{2}}$ onto $\boldsymbol{{\vec{u}}_{1}}$:

${\text{proj}}_{{\vec{u}}_{1}} {\vec{v}}_{2} = \frac{\left\langle{\vec{v}}_{2} , {\vec{u}}_{1}\right\rangle}{\left\langle{\vec{u}}_{1} , {\vec{u}}_{1}\right\rangle} {\vec{u}}_{1}$

How I remember it is that the vector that is projected (mapped), ${\vec{v}}_{2}$, is the only different term in the projection definition.

We continue by finding the inner product of ${\vec{v}}_{2}$ with ${\vec{u}}_{1}$, using YOUR definition, which is again, not quite the dot product of the vectors:

$\left\langle{\vec{v}}_{2} , {\vec{u}}_{1}\right\rangle = \textcolor{red}{2} {v}_{21} {u}_{11} + {v}_{22} {u}_{12}$

$= \textcolor{red}{2} \times 5 \cdot 2 + - 7 \cdot 1$

$= 13$

And the inner product of ${\vec{u}}_{1}$ with itself is the norm squared:

$\left\langle{\vec{u}}_{1} , {\vec{u}}_{1}\right\rangle = | | {\vec{u}}_{1} | {|}^{2} = {3}^{2} = 9$

As a result, the projection of ${\vec{v}}_{2}$ onto ${\vec{u}}_{1}$ is:

${\text{proj}}_{{\vec{u}}_{1}} {\vec{v}}_{2} = \frac{13}{9} \cdot \left(2 , 1\right)$

$= \left(\frac{26}{9} , \frac{13}{9}\right)$

and so, the vector ${\vec{u}}_{2}$ would be found as:

$\textcolor{red}{{\vec{u}}_{2}} = {\vec{v}}_{2} - {\text{proj}}_{{\vec{u}}_{1}} {\vec{v}}_{2}$

$= \left(5 , - 7\right) - \left(\frac{26}{9} , \frac{13}{9}\right)$

$= \left(\frac{45}{9} , - \frac{63}{9}\right) - \left(\frac{26}{9} , \frac{13}{9}\right)$

$= \textcolor{red}{\left(\frac{19}{9} , - \frac{76}{9}\right) \text{ }}$

Note that this is NOT normalized yet. The normalization of this is then:

$\textcolor{b l u e}{{\hat{u}}_{2}} = \frac{{\vec{u}}_{2}}{| | {\vec{u}}_{2} | |}$

$= \frac{\left(\frac{19}{9} \text{, } - \frac{76}{9}\right)}{\sqrt{\textcolor{red}{2} \times {\left(\frac{19}{9}\right)}^{2} + {\left(- \frac{76}{9}\right)}^{2}}}$

$= \left(\frac{19}{19 \frac{\sqrt{2}}{3} \cdot 9} \text{, } - \frac{76}{19 \frac{\sqrt{2}}{3} \cdot 9}\right)$

= ulcolor(blue)((1/(3sqrt2)", "-4/(3sqrt2))" ")

And indeed this has a magnitude of $1$ under this inner product definition.

Lastly, to check whether we are correct, we should see if the inner product of ${\hat{u}}_{1}$ and ${\hat{u}}_{2}$ is $0$ (for orthogonality only). We already know these vectors are properly normalized in this particular inner product space.

0 stackrel(?" ")(=) << hatu_1, hatu_2 >>

$= \textcolor{red}{2} \times \frac{2}{3} \cdot \frac{1}{3 \sqrt{2}} + \frac{1}{3} \cdot - \frac{4}{3 \sqrt{2}}$

$= \frac{4}{9 \sqrt{2}} + \left(- \frac{4}{9 \sqrt{2}}\right) = 0$ color(blue)(sqrt"")

So, this should be correct! (If you wish, you can check that $\left\langle{\hat{u}}_{1} , {\hat{u}}_{1}\right\rangle = \left\langle{\hat{u}}_{2} , {\hat{u}}_{2}\right\rangle = 1$, which is again, $\textcolor{red}{2} {u}_{11}^{2} + {u}_{12}^{2}$, and $\textcolor{red}{2} {u}_{21}^{2} + {u}_{22}^{2}$, respectively.)